Radio without auto-uncheck

BlitzMax Forums/BlitzMax GUI Programming/Radio without auto-uncheck

i want to create many radio-boxes.
at the moment, if i check one, all other radios are autom. unchecked.

YES i could create for each group separate panel - but i don't need this - instead of this i want to "check" and "uncheck" all radios manually (clicking with mouse should also working)

Use checkboxes?

hm no... i need radios (circles)

You need checkboxes. Radios are called that because they only select one thing at a time, like the pushbuttons on an automobile radio. Checkboxes are used for selecting multiple things. The shape has nothing to do with it.
Having radios as circles and checkboxes as squares are for creating consistency with the interface. A user can look at the shape and immediately know how it will behave. Doing something other than the standard is not recommended as it will possibly confuse the end user.
If there is some reason you must have checkboxes as circles instead of squares, then as far as I know, there is no native way to do it in BlitzMAX. You'll probably have to use separate panels like you suggested before or use some other method.

After some testing, I have found that my past statement about it not being possible is not true. You have to keep track of which buttons are being clicked and reset them all in the program every time one is clicked. Here is an example:
Strict
Global Window:TGadget = CreateWindow("Test",100,100,640,480)
Global Panel:TGadget = CreatePanel(0,0,640,480,Window)
Global Button1:TGadget = CreateButton("Test 1",10,10,80,10,Panel,BUTTON_RADIO)
Global Button2:TGadget = CreateButton("Test 2",10,25,80,10,Panel,BUTTON_RADIO)
Global Button3:Tgadget = CreateButton("Test 3",10,40,80,10,Panel,BUTTON_RADIO)
Global Selected:Int = 0 'Keep track of which buttons are selected here.

AddHook EmitEventHook,MyHook

Repeat
	WaitEvent()
Forever

Function MyHook:Object(id:Int,data:Object,context:Object)
	Local event:TEvent = TEvent(data)
	
	Select event.id
		Case EVENT_WINDOWCLOSE
			End
		Case EVENT_GADGETACTION
			Select event.source
				Case Button1
					If Selected & 1 'if button is selected then clear bit, else set bit
						Selected = Selected & 6
					Else
						Selected = Selected | 1
					End If
				Case Button2
					If Selected & 2
						Selected = Selected & 5
					Else
						Selected = Selected | 2
					End If
				Case Button3
					If Selected & 4
						Selected = Selected & 3
					Else
						Selected = Selected | 4
					End If
			End Select
                        'Reset all the buttons
			SetButtonState(Button1,Selected & 1)
			SetButtonState(Button2,(Selected & 2) > 0)
			SetButtonState(Button3,(Selected & 4) > 0)
			Return Null
	End Select
	
	Return data
End Function


thanks tom - this seems to work..

i need radio as radio gadget - but without parenting.
my other idea was to disable parent-value of radio-gadget to disable the known effect... but i had no luck

I think what he's saying is not that he wants to use radio buttons as checkboxes (that would be inconsistent with GUI interfaces) but that he wants multiple groups of radio buttons that behave independently of one another, which is totally acceptable.

I haven't used much of the MaxGUI stuff though so I don't know how you do this or even if you can.