Simple Tutorial - 13 : Spinning Around

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
esgici
Posts: 4253
Joined: Wed Jul 30, 2008 9:17 pm
Location: iskenderun / Turkiye
Has thanked: 132 times
Been thanked: 42 times
Contact:

Simple Tutorial - 13 : Spinning Around

Post by esgici » Fri Aug 01, 2008 1:40 am

Simple tutorial based upon HMG Offical Tutorial for beginners.

Spinning Around


An alternate way to get numeric data is the spinner control. It consist of a textbox with two arrows that allows to change control's value using the mouse.

Code: Select all

@ 10,10 SPINNER Spinner_1 ;
        RANGE 0,10 ;
        VALUE 5 ;
        WIDTH 100

Code: Select all

#include "minigui.ch"

Function Main

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

        DEFINE MAIN MENU
           POPUP "First Popup"
             ITEM 'Change Spinner Value'   ACTION ;
                   Win_1.Spinner_1.Value := 8
             ITEM 'Retrieve Spinner Value' ACTION ;
                    MsgInfo ( Str(Win_1.Spinner_1.Value))
           END POPUP
        END MENU

        @ 10,10 SPINNER Spinner_1 ;
                RANGE 0,10 ;
                VALUE 5 ;
                WIDTH 100

    END WINDOW
   
    CENTER   WINDOW Win_1
    ACTIVATE WINDOW Win_1

Return
Image

Regards

esgici
Viva INTERNATIONAL HMG :D

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest