Good night from Peru, dear appeon community.
I want to develop a program, that it able show a clock and get hour,minute and second; when user press a button.
The clock able be of two types: circle clock and digital clock.
I'am using PB 17.
Thanks.
Good night from Peru, dear appeon community.
I want to develop a program, that it able show a clock and get hour,minute and second; when user press a button.
The clock able be of two types: circle clock and digital clock.
I'am using PB 17.
Thanks.
There is an example of an analog clock in the PB Examples project that comes with Powerbuilder. It's under the User Objects treeview item in the running project. The userobject is called u_analog_clock in the pbexamuo.pbl
Greetings, Cesar -
For a digital clock, you might consider obtaining a "digital display segment" TrueType font (.ttf). A web search shows there several you can download. Some are free for personal use and some are not. Some are free for commercial use and some are not. It appears there are many different styles to choose from.
For an analog clock, consider drawing your own. A filled-in circle, lines for the hour, minute and second hands, text labels for the hour numbers. The challenge is performing the math to calculate the X,Y coordinates of the line endpoints. It's not impossible, but it's not trivial, either. The complexity depends on the size, appearance and sophistication of what you are trying to render, whether you want to use this in a DataWindow or in a Window, does it "run" (tick second-by-second) or not, how would you indicate A.M. or P.M., etc., none of which you described in your post.
Regards, John
Hi Ceasar;
My framework has the ability to add a User Object to any Menu's toolbar. The UO can contain as many child UO or Control's within it. Below is an example of a UO that has a DataWindow, CB and DDLB within it. The DWO is displaying as a digital clock, as follows:
Is this something that you could use for the digital clock?
Regards ... Chris