[Gambas-user] Problem with datacontrol font and background

Tobias Boege taboege at ...626...
Thu Oct 3 16:19:41 CEST 2013


On Thu, 03 Oct 2013, Marty McGlensey wrote:
> Good morning all,
> 
>  
> 
> I'm running Gambas version 3.4.2. I have a form containing a datasource. The
> datasource is linked to a table containing a primary index field. I've
> placed datacontrols on the datasource. All controls contain appropriate
> data. The problem is that the datacontrol linked to the primary index field
> has a different font and background than the other datacontrols. The cursor
> function is also different. This datacontrol's font is bolded; the
> background is medium gray. All other datacontrol text is not bold and the
> background is white and the cursor works as expected.
> 
>  
> 
> I have three instances of this behavior, each in a different table. Each one
> is linked to the primary index in that table. The datacontrol properties are
> set to the defaults except for the field name. Yes the datacontrol is
> enabled and visible. I've tried changing the background manually but that
> has no effect. Why is this happening? Looks like it has to do with the
> underlying field. I would like to have this field displayed like the others
> and accept user input to be saved to the datatable.
> 

Yes, I don't know the details but DataControls behave differently according
to the underlying field type. The thing with the primary index is that you
should (or can?) not change it. The bold font is most likely an aesthetic
thing. So far the reason. (You can also have a look at the source code[0].)

If you can influence the DataControl's self-setup, or if it can be
implemented, is something Benoit has to say.

Regards,
Tobi

[0] http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.db.form/.src/DataControl.class
    and the accompanying DataField.class are particularly interesting here.
    Both are relatively easy to comprehend for such an advanced component.




More information about the User mailing list