[Gambas-user] Problem with DataControl

T Lee Davidson t.lee.davidson at gmail.com
Thu Dec 21 19:42:11 CET 2017


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.


-- 
Lee

On 12/21/2017 10:27 AM, bkv at mailbox.org wrote:
> Thanks for your response, Lee.
> I have attached an archive of my project. The problem is in the form called FMLadelogg and the control is Kommentar. My dekstop is KDE, so I guess I use QT.
> 
> The control fills from left to right, but not from top to bottom. I get only one line, and I cannot break it.
> 
> Regards,
> Bjørn
> 
> 
>> On December 20, 2017 at 7:09 PM T Lee Davidson <t.lee.davidson at gmail.com> wrote:
>>
>>
>> On 12/18/2017 02:33 AM, bkv at mailbox.org wrote:
>>> *Hi
>>>
>>> I have a form with a DataControl. I want to write text (comments) into the control. Unfortunately the Enter key has no effect in
>>> this control. I cannot break the line. I can onlyt get one line of text, and if long enough, it will extend out of the visible
>>> part. Also, when I type, the text does not come on the upper part of the control, but on the middle.
>>>
>>> Strangely, I have an other form where the DataControl works OK.
>>>
>>> Help is appreciated
>>>
>>> Greetings,
>>>
>>> Bjørn*
>>>
>>
>> I don't understand what you mean by, "the text does not come on the upper part of the control, but on the middle." When I type
>> in the control, the text is filled in left to right and top to bottom.
>>
>> Are you using Qt or GTK?
>>
>> Also, I noticed that any text after a linefeed will not be written to the field when using the Save button in the DataBrowser.
>>
>> It might help if you provided us with an archive of your project or of a stripped down version. Often, isolating relevant parts
>> of the code will reveal the problem.
>>
>>
>> -- 
>> Lee
>>
>> --------------------------------------------------
>>
>> This is the Gambas Mailing List
>> https://lists.gambas-basic.org/listinfo/user
>>
>> Hosted by https://www.hostsharing.net
>>
>>
>>
>> --------------------------------------------------
>>
>> This is the Gambas Mailing List
>> https://lists.gambas-basic.org/listinfo/user
>>
>> Hosted by https://www.hostsharing.net


More information about the User mailing list