Simple Tutorial - 9 : Getting Dates

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Simple Tutorial - 9 : Getting Dates

Post by esgici »

Simple tutorial based upon HMG Offical Tutorial for beginners.

Getting Dates (The DATEPICKER Control)


The easiest way to get dates from user is the DATEPICKER control.

Code: Select all

@ 10,10 DATEPICKER Date_1

Code: Select all

#include <minigui.ch>

Function Main

    DEFINE WINDOW Win_1 ;
        AT 0,0 ;
        WIDTH 400 ;
        HEIGHT 200 ;
        TITLE 'DatePicker Test' ;
        MAIN

        DEFINE MAIN MENU
           POPUP "First Popup"
             ITEM 'Change DatePicker Value'   ACTION ;
                  Win_1.date_1.Value := Date()
             ITEM 'Retrieve DatePicker Value' ACTION ;
                  MsgInfo ( dtoc(Win_1.Date_1.Value))
           END POPUP
        END MENU

        @ 10,10 DATEPICKER Date_1

    END WINDOW

    CENTER   WINDOW Win_1
    ACTIVATE WINDOW Win_1

Return

Image


DatePicker is very handy, clever and useful control. For it's details look by buildig and running C:\hmg\SAMPLES\DATEPICKER\Demo.prg.

Regards

esgici
Last edited by esgici on Thu Aug 07, 2008 1:30 pm, edited 2 times in total.
Viva INTERNATIONAL HMG :D
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Simple Tutorial - 9 : Getting Dates

Post by Rathinagiri »

And we are having textbox with date. That is really a simple control I use a lot. That is because in the case of textbox-date you don't need to press tab or go for mouse within the control to advance to year/month/day. Just start typing and the cursor advances itself and saves a key stroke. ;)
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: Simple Tutorial - 9 : Getting Dates

Post by esgici »

rathinagiri wrote:And we are having textbox with date. That is really a simple control I use a lot. That is because in the case of textbox-date you don't need to press tab or go for mouse within the control to advance to year/month/day. Just start typing and the cursor advances itself and saves a key stroke. ;)
Yes, you are right.

TIA

esgici
Viva INTERNATIONAL HMG :D
Post Reply