; Module/File: OptionGadget_SetToToggleButton.pb ; Function: Change OptionGadget to Standard-ToggleButton with Radio-Function - Linux ; Author: Omi ; Date: July 16, 2014 ; Version: 0.1 ; Target Compiler: PureBasic 5.22/5.31/5.40 ; Target OS: Linux: (X/K/L)ubuntu, Mint, 32/64, Ascii/Uni ;-------------------------------------------------------------- EnableExplicit #Win_Main = 0 Enumeration #But1 #But2 #But3 EndEnumeration Global.i gEvent, gQuit If OpenWindow(#Win_Main, #PB_Ignore, #PB_Ignore, 250, 250, "Option-Button-Convert", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) OptionGadget(#But1, 5, 5, 150, 30, " Button Relief Normal") OptionGadget(#But2, 5, 40, 150, 30, " Button Relief half") OptionGadget(#But3, 5, 75, 150, 50, " Button Relief none") gtk_toggle_button_set_mode_(GadgetID(#But1), #False) gtk_toggle_button_set_mode_(GadgetID(#But2), #False) gtk_toggle_button_set_mode_(GadgetID(#But3), #True) Else End EndIf Repeat gEvent = WaitWindowEvent() If EventWindow() = #Win_Main Select gEvent Case #PB_Event_CloseWindow gQuit= #True EndSelect EndIf Until gQuit ; IDE Options = PureBasic 5.45 LTS (Linux - x86) ; CursorPosition = 26 ; EnableUnicode ; EnableXP ; CurrentDirectory = /home/charly-xubuntu/Programming/PureBasic/purebasic/