[Gambas-devel] TimePicker
David Villalobos Cambronero
david_villalobos_c at ...7...
Thu Nov 19 15:58:53 CET 2009
Thanks, Im prefer to leave the popup, the rest of things I will make them and send it back.
Reagards.
--
David
----- Original Message ----
From: Benoît Minisini <gambas at ...1...>
To: mailing list for gambas developers <gambas-devel at lists.sourceforge.net>
Sent: Thu, November 19, 2009 8:34:42 AM
Subject: Re: [Gambas-devel] TimePicker
> Hi Benoît, days ago I was theaching Gambas and my students tell me that it
> will be nice to have a TimePicker. Here is a first try to do that.
>
> I would like to know you comments. I think is a nice control to add to
> gb.form.
>
>
>
> Regards
>
>
> --
> David
>
OK, but:
- Why making a popup? Put the three SpinBox directly inside the control. And
create a ReadOnly property.
- If you prefer making a popup because you find that nicer, align its left to
the left of the control, I think it's better. You should add a panel with a
plain border as first popup child, so that the popup is clearly visible. And
you should hide the popup as soon as it loose focus. Alas, there is a weird
behaviour in gb.qt4: borderless windows prevent their children controls from
raising focus events! As soon as it is fixed, you will be able to hide the
popup correctly.
- The Value property seems to be a string. It must be a Date. The Date
datatype includes both date and time, so you should use it for time values
too.
- The time format is usually "hh:nn:ss" (Gambas Format$ syntax), but is it
true in all languages? The control should analyze:
Format(CDate("01:02:03"), gb.LongTime)
to see in which order it gets hours, minutes and seconds. And adapt the order
of SpinBox controls accordingly.
- In the same way, you should follow the System.RightToLeft property, which
tells you if the current language is right to left written. For such
languages, the order of SpinBox will be reversed, as well as the alignment of
the popup.
- The Format property should use two constants, not the 12 and 24 integer
values.
- The ToSeconds/ToMinutes/ToHours properties should be removed. They are
actually helper functions related to the Date datatype, not really related to
the control itself. I don't say that they are not useful, but putting them
inside the control source code is not a good idea.
Regards,
--
Benoît Minisini
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel
More information about the Devel
mailing list