On Windows 11 this works well, but on Ubuntu 24.04 all the radio buttons become on (selected).
It seems like a bug to me.
Code: Select all
Procedure GadgetFit(MARCOAGPINTO_gadget)
MARCOAGPINTO_x=GadgetX(MARCOAGPINTO_gadget)
MARCOAGPINTO_y=GadgetY(MARCOAGPINTO_gadget)
MARCOAGPINTO_w=GadgetWidth(MARCOAGPINTO_gadget)
MARCOAGPINTO_h=GadgetHeight(MARCOAGPINTO_gadget)
MARCOAGPINTO_w_new=GadgetWidth(MARCOAGPINTO_gadget,#PB_Gadget_RequiredSize)
MARCOAGPINTO_h_new=GadgetHeight(MARCOAGPINTO_gadget,#PB_Gadget_RequiredSize)
If MARCOAGPINTO_w<>MARCOAGPINTO_w_new Or MARCOAGPINTO_h<>MARCOAGPINTO_h_new
ResizeGadget(MARCOAGPINTO_gadget,MARCOAGPINTO_x,MARCOAGPINTO_y,MARCOAGPINTO_w_new,MARCOAGPINTO_h_new)
EndIf
EndProcedure
OpenWindow(1,10,10,800,600,"Testing",#PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_SizeGadget)
OpenWindow(2,0,0,640,480,"About",#PB_Window_WindowCentered,WindowID(1))
DisableWindow(1,#True)
x=10
y=10
default_gadget_height_radio=21
OptionGadget(1,x,y,default_gadget_height_radio,default_gadget_height_radio,"")
GadgetFit(1)
x+GadgetWidth(1)+20+5
TextGadget(1+1000,x,y,10,10,"Radio 1")
GadgetFit(1+1000)
OptionGadget(2,x,y,default_gadget_height_radio,default_gadget_height_radio,"")
GadgetFit(2)
x+GadgetWidth(2)+20+5
TextGadget(2+1000,x,y,10,10,"Radio 2")
GadgetFit(2+1000)
OptionGadget(3,x,y,default_gadget_height_radio,default_gadget_height_radio,"")
GadgetFit(3)
x+GadgetWidth(3)+20+5
TextGadget(3+1000,x,y,10,10,"Radio 3")
GadgetFit(3+1000)
OptionGadget(4,x,y,default_gadget_height_radio,default_gadget_height_radio,"")
GadgetFit(4)
x+GadgetWidth(4)+20+5
TextGadget(4+1000,x,y,10,10,"Radio 4")
GadgetFit(4+1000)
OptionGadget(5,x,y,default_gadget_height_radio,default_gadget_height_radio,"")
GadgetFit(5)
x+GadgetWidth(5)+20+5
TextGadget(5+1000,x,y,10,10,"Radio 5")
GadgetFit(5+1000)
okay=#False
Repeat
event=WaitWindowEvent()
If event=#PB_Event_CloseWindow
okay=#True
EndIf
Until okay=#True
; Close the About window and activate the main window
DisableWindow(1,#False)
CloseWindow(2)