Simple Tutorial - 16 : Showing Status

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 - 16 : Showing Status

Post by esgici »

Simple tutorial based upon HMG Offical Tutorial for beginners.

Showing Status (Statusbar Control)


This control creates a bar at window's bottom, used to show information (usually status information)

Code: Select all

#include "minigui.ch"

Function Main

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

        DEFINE MAIN MENU
            POPUP '&StatusBar Test'
                ITEM 'Set Status Item 1' ACTION ;
                     Win_1.StatusBar.Item(1) := "New value 1"
                ITEM 'Set Status Item 2' ACTION ;
                     Win_1.StatusBar.Item(2) := "New value 2"
            END POPUP
        END MENU

        DEFINE STATUSBAR
            STATUSITEM "Item 1" ACTION MsgInfo('Click! 1')
            STATUSITEM "Item 2" WIDTH 100 ACTION MsgInfo('Click! 2')
            CLOCK
            DATE
            STATUSITEM "Item 5" WIDTH 100
        END STATUSBAR

    END WINDOW
   
    CENTER   WINDOW Win_1
    ACTIVATE WINDOW Win_1

Return
Image

Regards

esgici
Viva INTERNATIONAL HMG :D
Post Reply