[Gambas-user] (Quicky) Separators in combobox lists

Bruce adamnt42 at gmail.com
Fri Sep 18 20:30:50 CEST 2020


On 19/9/20 3:32 am, Gianluigi wrote:
> Il giorno ven 18 set 2020 alle ore 16:02 Gianluigi <bagonergi at gmail.com> ha
> scritto:
> 
>>
>>
>> Il giorno mer 16 set 2020 alle ore 23:43 T Lee Davidson <
>> t.lee.davidson at gmail.com> ha scritto:
>>
>>> On 9/16/20 3:25 PM, Bruce wrote:
>>>> (Don't think too hard on this one it's just an idea)
>>>
>>>> Anyway, just a quicky, anyone got any ideas?
>>>>
>>>
>>> Space$(10)
>>> ..
>>>
>>
>> I enclose a minimal combobox type component which shows a list with the
>> desired number of lines (max 20), and separators of different style, color
>> and thickness.
>> ...
>> Attached as a zip to avoid problems with GMail.
>>
> 
> Who explains to me how I could have inserted an enumeration instead of an
> integer property in the constant _properties (SeparatorStyle {Solid;
> Dotted; Dashed; Double} = Solid)?
> I had to use a string but it doesn't work well if I have to set the style
> from code.
> 
> Or do I have to do something different, like inherit from another class?
> 
> Regards
> Gianluigi
> 

AFAIK and according to the help, you cant use an enum.
But you can use a (public) constant list, so
create a class, say "septype" that just exposes the constants
and use
_properties ... ,septype {*} = septype.Solid .....

and you can use the same constants in your code.

b

(swnt from phone, exguse typos)


More information about the User mailing list