[Gambas-user] Missing feature?

Benoît Minisini gambas at ...1...
Sun Oct 18 17:53:16 CEST 2009


> TextBoxes and Labels have an alignment property but DataControls do not.
> 
> Is that by design? Are there plans to change it?
> 
> Is there a workaround to allow the alignment of a DataControl, apart
> from hiding the DataControls and mirroring the data in a TextBox?
> 

Not really, not really. But it should be not really difficult to add it.

The idea behind DataControl is changing the actual control used according to 
the datatype of the field. So it just a matter of being careful that not all 
true controls used by DataControl support an Alignment property.

If I remember, at the moment, Number are right aligned, and other data left 
aligned by default.

You can look if the source code of DataControl if you like. I cannot guarantee 
you that I will find time to implement that just now!

> Also, while I'm asking questions, but on a separate topic...
> 
> Is there any way to set the foreground and background colours of a
> disabled TextBox to something other than the almost unreadable colours
> used in the default linux colour schemes?
> 
> All suggestions, other than rude suggestions, are welcome.
> 

Alas the behaviour of disabled controls mostly depends on the toolkit, the 
theme used, and the colours used in the control center for KDE.

And if setting the background (or foreground) color of a control sets its 
colour both for normal and disabled mode, there will be no way for the user to 
see the difference between a normal and a disabled control, which is not a 
good thing.

Regards,

-- 
Benoît Minisini




More information about the User mailing list