[Gambas-user] DataControl and multi-line text
tobias
tobiasboe1 at ...20...
Sat Oct 1 18:20:54 CEST 2011
hi,
we had a problem regarding DataControl. someone wanted to display
multi-line text from a database using controls from gb.db.form (for
simplicity).
but DataControl is only a single-line textbox, no worwrap no multiple lines.
i just want to ask if this is already considered a problem and if there
will be something like a DataControl based on TextArea.
i think, it would be more useful to have a basic DataControl, just to
associate the object with a field from DataSource's table, and have a
control associated to this DataControl to display the value with an
event to fill it, like this:
DataControl.Control = TextArea1
Public Sub DataControl_SetValue(vValue As Variant) 'called whenever the
datacontrol has to change its contents
Last.Control.Text = CStr(vValue)
End
or another property (in DataControl) for the property of the control to
insert the value into, like:
DataControl.Control = TextArea1
DataControl.ControlProperty = "Text"
whenever the contents of the datacontrol have to be changed this may be
done internally:
Object.SetProperty(Me.Control, Me.ControlProperty, Value)
just an idea while writing this, haven't thought deeply.
this would mean more code for the programmer but also more control. it
would be possible this way to build a spinbox or something into a
datacontrol:
DataControl.Control = SpinBox1
DataControl.ControlProperty = "Value"
regards,
tobi
More information about the User
mailing list