[Gambas-devel] Short-Circuit and Key.Text
Benoît Minisini
gambas at ...1...
Sat Apr 17 14:20:30 CEST 2010
> 2010/4/16 Benoît Minisini <gambas at ...1...>:
> > You should not implement a DateBox that will just manage a date. You must
> > implement a ValueBox control that does at least the same thing that the
> > old one, because it is used in other components. But maybe this is your
> > plan?
>
> Just is a design test. The final goal is write a ValueBox control.
OK, cool.
Actually is it a good idea. We should provide some specific controls to edit
specific datatypes, and merge them inside the ValueBox:
- Your DateBox, that may replace DatePicker.
- a "MaskBox", that would be a TextBox with a mask. It could be use to edit
things like "IP address", "emails"... I will work on that, to see if a new
control is needed, or if TextBox can get the mask directly.
>
> Someone else is working on that? I wonder you because I installed
> Gambas3 and I saw changes in the sources of ValueBox. I don't want
> duplicate efforts.
Some changes were made only in Gambas 3 because Gambas 2 can only get bug
fixes, not new features. But you must work on Gambas 3. So, ignore the
changes, or take them. Do as you like! :-)
In a few words, the goal of ValueBox is being able to edit a value according
to its datatype and/or its meaning.
The datatype and the meaning is not necessarily the same thing. For example, a
"String" and a "IP address" should not be edited the same way, but a "Date" is
just a date.
The value editor should adapt to the datatype: a (working) popup calendar for
a date, a spinbox for a integer number within a range...
The ValueBox.Type property can be an integer like now, or a string that
describes the ValueBox meaning entirely.
Let's suppose we take the last way, which is more open to the future. :-)
The ValueBox.Type could be :
Integer[:Format]
Number[:Format]
Range[:Min:Max]
Date
Time
IPAddress
MailAddress
Color
Boolean
File
URL
Currency
Font
...
We could take a syntax that ":" is a separator, and that everything between
":" is a type argument.
According to the type, the ValueBox will use a TextBox, a SpinBox, a DateBox,
a ButtonBox whose button will open a specific editor... And so on.
What do you think about that?
P.S. We should talk on the developer mailing-list so that everything is
archived and visible to other interested people.
Regards,
--
Benoît Minisini
More information about the Devel
mailing list