Topic: checkboxes or radio buttons grouped in list box

anybody have code snippet where buttons or boxes are placed in list box and callback extracts position of selected box/button? now using

         lst_bx = createlistbox(410, 100, 100 ,200, catsc)
         c_butt(1) = createcheckbox (410, 100, 100, 45, "but1")
         c_butt(2) = createcheckbox (410, 150, 100, 45, "but2")
         c_butt(3) = createcheckbox (410, 200, 100, 45, "but3")
         c_butt(4) = createcheckbox(410,  250, 100, 45, "but4")

callback:
         btn = getlistboxselection (lst_bx)    ! which check box was checked?

         btn comes out neg

obviously missing something

Re: checkboxes or radio buttons grouped in list box

AppGraphics doesn't support placing anything in a listbox except text.  From your code, I can see that you've created a listbox and then drawn the checkboxes over the listbox. This operation doesn't actually place the checkboxes in the listbox; it only draws them there.

To place text in a listbox, you would actually use insertlistboxentry.  Placing other controls in a scrolling listbox would be a nontrivial addition to the library.

Jeff Armstrong
Approximatrix, LLC

Re: checkboxes or radio buttons grouped in list box

thanks Jeff