[Gambas-user] Custom controls, Non-String arrays in the IDE

Bruce Steers bsteers4 at gmail.com
Wed Aug 10 12:53:17 CEST 2022

You know how you can put the following in a custom control..

*Public Const _Properties As String = "*,StringArray"*

*Property StringArray As String[] Use $aStringArray*

Then in the IDE form designer you'll get the StringArray property and get
an editor to insert strings to the list.

If i use ANY other type like Integer[] or Float[] then it does not work the
same. i just get a combobox with "none" to select, and if i do select none
i then have to manually edit the .form file to remove the def as it raises
an error.

Could the form designer also handle other types?
Integer[] and Float[] shouldn't be too hard to handle.
The existing string[] editor could be used then the items converted to
their respective type array.

Would open up a few things for me.

I'm trying to add gradients to a control and want to handle the Colors[]
and StopPoints[] in the IDE

Can some method be added to a Custom control class that the IDE can use to
pop up our own editor window ?
Something like this maybe?..

*Public Const _Properties As String = "*,IntegerArray{IntList()}"*

*Private Sub IntList() As Integer[]*

*  FGetIntegers.ShowModal()*

*  Return FGetIntegers.List*


then FIntegers pops open my own list editor

Is something like this already possible ?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220810/d5d6a8ac/attachment.htm>

More information about the User mailing list