Hi Thierry,
Two thoughts about comboboxes:
- The option is not disabled by a backslash if the popup is built with AddItem (if RowSource is a list, the backslash does disable the option)
- Is the limitation to 255 characters of a list still justified in web mode ?

Hi Vincent,
The option is not disabled by a backslash if the popup is built with
.AddItem()
This is a VFP limitation: when using .AddItem()
, VFP stores internally the disabled
status of the item and displays it accordingly, and offers no way to query this status programmatically; FoxInCloud is thus unable to know that a given item is disabled.
I recommend you use .waRowSource
as .rowSource
instead:
dimension this.waRowSource[aLen(this.waRowSource)+1] && to be adapted when adding 1st element
this.waRowSource[aLen(this.waRowSource)] = '\disabled item'
…
this.rowSourceType = 5
this.rowSource = 'this.waRowSource'
limitation to 255 characters
Unsure what limitation you're referring to; please specify.
Thanks Thierry, I will try with waRowSource ...
Limitation to 255 characters
The 255 character limitation concerns the value of the RowSource (RowSourceType = 1).
This list is cropped when it is longer
Cool!
Here is a more generic code:
dimension this.waRowSource[iif(empty(this.waRowSource), 0, aLen(this.waRowSource))+1]
this.waRowSource[aLen(this.waRowSource)] = '\disabled item'
…
this.rowSourceType = 5
this.rowSource = 'this.waRowSource'
I'm reconsidering the question of the length of the list in a combobox (RowSource = 1).
Is it possible to remove the existing limitation in the desktop version ?
Len(.RowSource) <= 255
is another VFP limitation.
.waRowSource
does not have such limitation; please consider this code :
o = CreateObject('awCbo') && as combobox, FoxInCloud class
o.RowSourceType = 1
o.RowSource = Replicate('a,', 150) && 300 chars
? Len(o.RowSource) && 256
? o.listcount && 128
o.RowSourceType = 0
&& use .waRowSource instead
? ALines(o.waRowSource, Replicate('a,', 150), 5, ',') && 150
o.RowSourceType = 5
o.RowSource = 'o.waRowSource'
? o.listcount && 150
The best place to set .waRowSource
and .RowSource
is .Init()