[Gambas-user] Gambas Custom Controls - Property as Constant List

Claus Dietrich claus.dietrich at freenet.de
Fri Dec 11 22:37:59 CET 2020


Hi

I recently wrote a number of custom user controls (visible in the IDE)
and bumbed into the problem, that I couldn't make the IDE to offer a
list of declared constants (here "StyleStrokes" and "StyleScale") under
a custom control property (here "Style").

As I didn't clearly understand the chapter "/Constant lists/" in the
wiki, my temporary solution consists of a range definition
(Style{Range:1;2}=1).

Name of my Custom Control Class: Knob

Export
....
Public Const StyleStrokes As Integer = 1
Public Const StyleScale As Integer = 2
...
Public Const _Properties As String = "*,....,Style{Range:1;2}=1"

Any attempt failed to get a combo with said constants and I particularly
didn't know how to read the sentence in the wiki saying "..... you can
specify a class instead ....". What you mean by "can" and does it have
to be a separate class? Any detail for the required syntax and
instructions beyond the wiki would be much appreciated.

Best regards

Claus

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


More information about the User mailing list