[Gambas-user] Check Boxes (a bug?)

T Lee Davidson t.lee.davidson at gmail.com
Fri Jun 11 21:33:31 CEST 2021


On 6/11/21 1:20 PM, John Dovey wrote:
> Thank you, That's helpful.
> Now to make it work...
> 
> Just one quick comment. I pasted your code with the "CheckBoxGroup_Click()" subroutine, but I named the group 'AflagsGroup". It 
> took me a few minutes to figure out why it wasn't working. There was no error that there was no such event :-)

Ah, my bad. Please change the declaration for myAflagsString to:
Dim myAflagsString As New String[]

Scalars and strings are automatically instantiated while arrays and collections are not (unless a definition is provided with 
the declaration using the "=" operator).


And also, in the Form_Open event, uncomment lines 123-126 and change them to:
     ChkAflag_CM.Value = myAflags["CM"]
     ChkAflag_MO.Value = myAflags["MO"]
     ChkAflag_LO.Value = myAflags["LO"]
     ChkAflag_ICM.Value = myAflags["ICM"]

This will set the status of each checkbox appropriately.


-- 
Lee


More information about the User mailing list