[Gambas-user] Problem with DataControl

T Lee Davidson t.lee.davidson at gmail.com
Thu Dec 21 20:20:37 CET 2017


On 12/21/2017 01:58 PM, Benoît Minisini wrote:
> Le 21/12/2017 à 19:42, T Lee Davidson a écrit :
>> Well I've determined the cause of the different behavior, but I don't know how to correct it.
>>
>> The DataControls, both named Kommentar, on FMain and FMLadelogg do behave differently because their respective underlying text
>> controls are different.
>>
>> Inserting "Debug Kommentar.Control" into the Form.Open Subs of each form yields:
>> FMain.Form_Open.9: (TextArea 0xe31448)
>> FMLadelogg.Form_Open.15: (TextBox 0x105ce08)
>>
>> And as we know, TextArea is a multi-line control, and TextBox is single-line.
>>
>> Now according to the Wiki, DataControl.Control is read-only precluding programmatic control of the underlying text editing
>> control.
>>
>> Apparently, that is decided by the interpreter/compiler. And perhaps the difference is because FMLadelogg form is opened as
>> Modal and FMain would not be.
>>
>> Someone else, perhaps Benoît, will need to clarify that.
>>
>>
> 
> TextArea is used when the underlying database field has no limit. Otherwise a TextBox is used.
> 

Thank you for that very useful clarification, Benoît.

However, neither one of the relative underlying database fields has no limit.

The one given a TextBox control has VARCHAR(200) and the DataControl given the TextArea has VARCHAR(500). Is 500 above a
threshold that is considered 'no limit'?

I'm just curious about that for future reference, because I think Bjørn can solve his problem by simply raising the limit on the
one field.


-- 
Lee


More information about the User mailing list