4. Commands

4.1. Commands for windows and dialogs handling

INIT WINDOW

This command creates the window - main, MDI or MDI CHILD. To force this window show up on the screen you need to activate it later. You can do this with ACTIVATE WINDOW command or with Activate() method of that window object.

      INIT WINDOW <oWnd>
    	 [ MAIN ]
    	 [ MDI ]
    	 [ MDICHILD ]
         [ APPNAME <appname> ]
    	 [ TITLE <cTitle> ]
    	 [ AT <x>, <y> ]
    	 [ SIZE <width>, <height> ]
    	 [ ICON <ico> ]
    	 [ SYSCOLOR <sysclr> ]
    	 [ BACKCOLOR <clr> ]
         [ BACKGROUND BITMAP <oBmp>> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ MENUPOS <nPos> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    	 [ ON OTHER MESSAGES <bOther> ]
    	 [ ON EXIT <bExit>]
         [ HELP <cHelp> ]
         [ HELPID <nHelpId> ]
    

MAIN,MDI,MDICHILD clauses specifies the type of the window, only one of this clauses may be used in the command.
cTitle - title of the window;
x,y,width,height - left and top coordinates of the window, it's width and height;
ico - an icon for a window, an object of HIcon class;
clr - the background color of the window;
nStyle - style of the window;
oFont - a font for a window, an object of HFont class;
nPos - identifies the window menu used for controlling MDI child windows. As child windows are created, the application adds their titles to the Window menu as menu items. The user can then activate a child window by choosing its title from the window menu.
bSize - codeblock, which is evaluated while resizing window;
bPaint - codeblock, which is evaluated while window drawing;
bGFocus - codeblock, which is evaluated when window gets focus;
bLFocus - codeblock, which is evaluated when window losts focus;
bExit - codeblock, which is evaluated when window is closed;
bOther - codeblock, which is evaluated for all other messages - you can write your own procedure for messages handling;


Special information for tray applications:
The behavior of tray applications differs between Windows and LINUX.
On LINUX, the main windows appears at start time, but the main window is reachable by mouse right click.

(On LINUX, there is now way to change the tray icon, because
the WinAPI function "HWG_SHELLMODIFYICON" does not work here.
So the menu point "Change icon" does not appear on GTK/LINUX).

For details, see sample programs
samples/gtk_samples/testtray.prg and samples/testtray.prg .

Some screenshots from sample program "testtray.prg":
Windows 10:

Tray icon at start of example
Tray icon at start of example program with tooltip text

Tray with context menu
Tray with context menu


LINUX:
Main window
Main window

Tray message window
Tray message window


INIT DIALOG

This command creates the dialog box. To force the dialog show up on the screen you need to activate it later. You can do this with ACTIVATE DIALOG command or with Activate() method of that window object.

      INIT DIALOG <oWnd>
    	 [ TITLE <cTitle> ]
    	 [ AT <x>, <y> ]
    	 [ SIZE <width>, <height> ]
         [ ICON <ico> ]
         [ BACKGROUND BITMAP <oBmp> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ BACKCOLOR <clr> ]
    	 [ CLIPPER ]
    	 [ NOEXIT ]
    	 [ NOEXITESC ]
    	 [ NOCLOSABLE ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    	 [ ON OTHER MESSAGES <bOther> ]
    	 [ ON EXIT <bExit> ]
    	 [ HELPID <nHelpId>> ]
    

All clauses has the same meaning as in INIT WINDOW command, there is only two specific clause:

CLIPPER - to force the Clipper like behavior - the Enter key is used for moving between GET's;
   Important:
   The CLIPPER option has no effect on EDITBOX,
   because it is an HWGUI extension for multi line editing.
   So ENTER means LINE FEED.

NOEXIT - the Enter key doesn't cause closing of a dialog box.
On GTK, this option is forever active.

A little sample to handle the ESC key in a dialog for GTK:
(but also OK for Windows)

   #define GDK_Escape     0xFF1B
   #define VK_ESCAPE     GDK_Escape

   INIT DIALOG oDlg... NOEXIT
   ...
   #ifdef __GTK__
   SET KEY 0,VK_ESCAPE TO EDMSK_KEYESC(oDlg)
   #endif
   ... * Your dialog
   ACTIVATE DIALOG ...
   #ifdef __GTK__
   SET KEY 0,VK_ESCAPE TO
   #endif


   FUNCTION EDMSK_KEYESC(odlg)
   * Closes edit dialog at ESC key
   * hwg_MsgInfo("ESC key pressed") && Debug
      odlg:Close()
   RETURN NIL


ACTIVATE WINDOW
      ACTIVATE WINDOW <oWnd>
             [ NOSHOW ]
             [ MAXIMIZED ]
             [ MINIMIZED ]
             [ CENTER ]
             [ ON ACTIVATE <bInit> ]
    

This command is equivalent to 'oWnd:Activate()' call. It shows the previously created window and starts messages processing for it.


ACTIVATE DIALOG
      ACTIVATE DIALOG <oDlg>
             [ NOMODAL ]
             [ MAXIMIZED ]
             [ MINIMIZED ]
             [ CENTER ]
             [ ON ACTIVATE <bInit> ]

    Special instructions for non modal mode:
    The behavior of non modal dialoges differs between WinAPI and GTK.
    For details see function documentation for FUNCTION hwg_ShowHelp().
    

This command is equivalent to 'oDlg:Activate()' call. It shows the previously defined
dialog and starts messages processing for it. By default, it creates modal dialog.
You can create modeless dialog, specifying NOMODAL clause in this command.

Some commands between INIT DIALOG ... and ACTIVATE DIALOG ... NOMODAL
overwrite the modeless property, so the NOMODAL option is ignored and
the dialog started in modal mode. For example the HCEDIT command do this, see
HELP() function of CLLOG in src/hilfew.prg
(https://sourceforge.net/projects/cllog/).

Attention !
Be sure, that the dialog calling a subdialog in non modal mode is not closed in background.
Otherwise, if the calling dialog is closed, the called non modal subdialog is also closed
together with the calling dialog.


4.2. Menu commands

Additional instructions for menus:
Structure errors in menu command blocks are not recognized by the Harbour compiler.
At run time, in case of those error(s) the menu disappeared.
Check the structure manually.

LINUX/GTK: Submenus are mandatory.
If a main menu point is standalone, the action of this menu is not reachable.
You see only an empty sub menu "Aktivieren" (german, means "Activate"),
here the screenshot from Ubuntu LINUX:
System menu without submenu
Add a submenu point for multi platform programs, for example:
MENU OF oMainWindow
 MENU TITLE "&Exit"
   MENUITEM "&Quit" ACTION hwg_EndWindow()
 ENDMENU
 MENU TITLE "&Dialog"
...


MENU

      MENU [ OF <oWnd> ] [ ID <nId> ] [ TITLE <cTitle> ]
    

Some hints to usage of hotkeys in menu's and submenu's
(Letter marked with "&" character in MENUITEM caption):
The behavior is a little different between WinAPI and GTK/LINUX:
LINUX:
Press the "Alt" key (not the "AltGr" key) and hold it while pressing the
letter for the submenu (==> the & mark).
The activated Alt mode is marked by an underline of the menu letter
(during Alt key is pressed).
After the submenu is opened, release the "Alt" key ann press the letter of the
desired submenu.
WinAPI:
On Windows, the Alt key can be pressed once before selecting
the menu or submenu with the hotkey.


ENDMENU

      ENDMENU
    

MENUITEM

    MENUITEM <item> [ ID <nId> ]
        ACTION <act>
        [ BITMAP <bmp> ]
        [ ACCELERATOR <flag>, <key> ]
        [ <lDisabled: DISABLED> ]
    

MENUITEMCHECK

    MENUITEMCHECK <item> [ ID <nId> ]
        ACTION <act>
        [ ACCELERATOR <flag>, <key> ]
        [ <lDisabled: DISABLED> ]
    

4.2.5. SEPARATOR

      SEPARATOR
    

CONTEXT MENU

      CONTEXT MENU <oMenu>
    

ACCELERATOR

      ACCELERATOR <flag>, <key>
                [ ID <nId> ]
                ACTION <act>
    

4.3. Commands for controls handling

All the following commands creates the instances of classes, they are preprocessed into the New() method of appropriate class.


ADD STATUS TO

    ADD STATUS [ TO <oWnd> ]
    	 [ ID <nId> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ PARTS <aparts,...> ]
    

@ <x>,<y> SAY

    @ <x>,<y> SAY [ <oSay> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ TRANSPARENT ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> EDITBOX

    @ <x>,<y> EDITBOX [ <oEdit> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
         [ ON KEYDOWN <bKeyDown>]
         [ ON CHANGE <bChange> ]
    	 [ STYLE <nStyle> ]
         [ NOBORDER ]
         [ PASSWORD ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> BUTTON

    @ <x>,<y> BUTTON [ <oButton> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> CHECKBOX

    @ <x>,<y> CHECKBOX [ <oCheck> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ TRANSPARENT ]
    	 [ INIT <lInit> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

Additional information:
To avoid some trouble with presetting of values for CHECKBOX,
it is a better solution to use:
LOCAL lCheckbox1
lCheckbox1 := .F.
...
@ <x>,<y> GET CHECKBOX <oCheck> VAR lCheckbox1 ;
CAPTION <caption> SIZE <width>, <height>
(See sample program \samples\democheckbox.prg)
In this code snippet mentioned, it is mandatory to pre init the variable lCheckbox1
with .T. or .F. .


@ <x>,<y> COMBOBOX

    @ <x>,<y> COMBOBOX [ <oCombo> ITEMS ] <aItems>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ INIT <nInit> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CHANGE <bChange> ]
         [ ON GETFOCUS <bWhen> ]
         [ ON LOSTFOCUS <bValid> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    	 [ EDIT ]    (Windows only)
    	 [ TEXT ]
    	 [ DISPLAYCOUNT ]
    
Important advice:
The behavior in the WinAPI function at newer GCC/MinGW versions
differs. If the size in y direction is to small for all items,
the last items are not visible at the first call.
But they could be reached and selected by the cursor keys.
We recommend to place an advice in your dialog text or increase
the y size, so that all items have enough space to display.


@ <x>,<y> RADIOBUTTON

    @ <x>,<y> RADIOBUTTON [ <oRadio> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    	 [ TRANSPARENT ]
    

RADIOGROUP
       RADIOGROUP
    

END RADIOGROUP
       END RADIOGROUP [ SELECTED <nSel> ]
    

@ <x>,<y> PANEL

    @ <x>,<y> PANEL <oPanel>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ HSTYLE <oStyle> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    

ADD TOP PANEL

    ADD TOP PANEL [ <oPanel> ] TO <oWnd>
    	 [ ID <nId> ]
         HEIGHT <height>
    	 [ BACKCOLOR <bcolor> ]
    	 [ HSTYLE <oStyle> ]
    	 [ ON INIT <bInit> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    

ADD HEADER PANEL

    ADD HEADER PANEL [ <oPanel> ] [TO <oWnd>]
    	 [ ID <nId> ]
         HEIGHT <height>
    	 [ TEXTCOLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ HSTYLE <oStyle> ]
    	 [ FONT <oFont> ]
    	 [ ON INIT <bInit> ]
    	 [ ON PAINT <bDraw> ]
         [ TEXT <cText> [COORS <xt>[,<yt>] ] ]
         [ <lBtnClose: BTN_CLOSE> ]
         [ <lBtnMax: BTN_MAXIMIZE> ]
         [ <lBtnMin: BTN_MINIMIZE> ]

    


This commands is helpfull for creating a
suitable "Night modus" in your application,
for "eye friendly" display, if working
with the computer at low illumination.
For Details see sample program "demonight.prg".

Parameter "COORS" sets the left position (xt) of header text.


ADD STATUS PANEL

    ADD STATUS PANEL [ <oPanel> ] TO <oWnd>
    	 [ ID <nId> ]
         HEIGHT <height>
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON PAINT <bDraw> ]
         [ FONT <oFont> ]
         [ HSTYLE <oStyle> ]
         [ PARTS <aparts,...> ]

    

@ <x>,<y> BROWSE

    @ <x>,<y> BROWSE <oBrowse>
    	 [ ARRAY ]
    	 [ DATABASE ]          && Default
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CLICK <bClick> ]
    	 [ ON RIGHTCLICK <bRClick> ]
    	 [ ON GETFOCUS <bGetFocus> ]
    	 [ ON LOSTFOCUS <bLostFocus> ]
    	 [ STYLE <nStyle> ]
         [ <lNoVScr: NO VSCROLL> ]
         [ <lNoBord: NO BORDER> ]
    	 [ FONT <oFont> ]
         [ APPEND ]
         [ AUTOEDIT ]
         [ ON UPDATE <bUpdate> ]
         [ ON KEYDOWN <bKeyDown> ]
         [ ON POSCHANGE <bPosChg> ]
         [ MULTISELECT ]
    

@ <x>,<y> BROWSE <oBrw> FILTER

    @ <x>,<y> BROWSE <oBrowse> FILTER
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CLICK <bClick> ]
    	 [ ON RIGHTCLICK <bRClick> ]
    	 [ ON GETFOCUS <bGetFocus> ]
    	 [ ON LOSTFOCUS <bLostFocus> ]
    	 [ STYLE <nStyle> ]
         [ <lNoVScr: NO VSCROLL> ]
         [ <lNoBord: NO BORDER> ]
    	 [ FONT <oFont> ]
         [ APPEND ]
         [ AUTOEDIT ]
         [ ON UPDATE <bUpdate> ]
         [ ON KEYDOWN <bKeyDown> ]
         [ ON POSCHANGE <bPosChg> ]
         [ MULTISELECT ]
         [ DESCEND> ]
         [ WHILE <bWhile> ]
         [ FIRST <bFirst> ]
         [ LAST <bLast> ]
         [ FOR <bFor> ]
    

Additional instructions for filter usage:
The Harbour filter command "SET FILTER TO ..." can be normally used with the common
BROWSE command for databases. Use it with no trouble inside an active browse window.
After modifiying or deleting a filter setting, refresh the browse list with oBrw:Refresh() and
you see the browse list with the new filter setting.
Need more examples ?
Look at project "CLLOG" on Sourceforge (with search project function).
There you find many settings for "SET FILTER TO ..." and an editor for filter files as
a Harbour console or terminal application.


ADD COLUMN

    ADD COLUMN <block> <
    	 TO <oBrowse>
    	 [ HEADER <cTitle> ]
    	 [ TYPE <type> ]
    	 [ LENGTH <length> ]
    	 [ DEC <dec> ]
         [ <lEdit: EDITABLE> ]
         [ JUSTIFY HEAD <nJusHead> ]
         [ JUSTIFY LINE <nJusLine> ]
         [ PICTURE <cPict> ]
         [ VALID <bValid> ]
         [ WHEN <bWhen> ]
         [ ITEMS <aItem> ]
         [ COLORBLOCK <bClrBlck> ]
         [ BHEADCLICK <bHeadClick> ]
    

INSERT COLUMN

    INSERT COLUMN <block> <
    	 TO <oBrowse>
    	 [ HEADER <cTitle> ]
    	 [ TYPE <type> ]
    	 [ LENGTH <length> ]
    	 [ DEC <dec> ]
         [ <lEdit: EDITABLE> ]
         [ JUSTIFY HEAD <nJusHead> ]
         [ JUSTIFY LINE <nJusLine> ]
         [ PICTURE <cPict> ]
         [ VALID <bValid> ]
         [ WHEN <bWhen> ]
         [ ITEMS <aItem> ]
         [ COLORBLOCK <bClrBlck> ]
         INTO <nPos>
    

@ <x>,<y> OWNERBUTTON

    @ <x>,<y> OWNERBUTTON <oOwnBtn>
    	 [ OF <oWnd> ];  (WinAPI only)
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON CLICK <bClick> ]
    	 [ HSTYLES <aStyles,...> ]
    	 [ FLAT ]             (WinAPI only)
    	 [ DISABLED ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ TEXT <cText>
    	    [ COLOR <color> ] [ FONT <font> ]
    	    [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ]
    	 ]
    	 [ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT [COLOR  <trcolor> ] ]
    	    [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ]
    	 ]
         [ TOOLTIP <ctoolt> ]
         [ CHECK ]
    


  - If FLAT or OF ... used on GTK/LINUX, the ownerbuttons or the images are not visible.
  - Be care of supported image formats, see documentation of HBitmap CLASS.
  - BITMAP COORDINATES: On GTK/LINUX pass the real size of image:
       3rd and 4th parameter
       Set 1st and 2nd to centered image in the ownerbutton.
      On Windows, the value 0,4,0,0 is OK for all.


@ <x>,<y> SHADEBUTTON

(Windows only)
    @ <x>,<y> SHADEBUTTON <oOwnBtn>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
         [ EFFECT <shadeID>  [ PALETTE <palet> ]
              [ GRANULARITY <granul> ] [ HIGHLIGHT <highl> ]
              [ COLORING <coloring> ] [ SHCOLOR <shcolor> ] ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
    	 [ FLAT ]
    	 [ DISABLED ]
    	 [ TEXT <cText>
    	    [ COLOR <color> ] [ FONT <font> ]
    	    [ COORDINATES <xt>, <yt>, <widthtt>, <heightt> ]
    	 ]
    	 [ BITMAP <bmp> [ FROM RESOURCE ] [ TRANSPARENT [COLOR  <trcolor> ] ]
    	    [ COORDINATES <xb>, <yb>, <widthtb>, <heightb> ]
    	 ]
         [ TOOLTIP <ctoolt> ]
         [ CHECK ]
    

@ <x>,<y> NICEBUTTON

(Windows only)
    @ <x>,<y> NICEBUTTON [ <oBut> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ ON INIT <bInit> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
    	 [ EXSTYLE <nStyleEx> ]
    	 [ TOOLTIP <ctoolt> ]
    	 [ RED <r> ]
    	 [ GREEN <g> ]
    	 [ BLUE <b> ]
   

@ <x>,<y> GROUPBOX
    @ <x>,<y> GROUPBOX [ <oGroup> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    

@ <x>,<y> DATEPICKER (Windows only)
    @ <x>,<y> DATEPICKER [ <oPicker> ]
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ INIT <value> ]
    	 [ ON INIT <bInit> ]
    	 [ ON GETFOCUS <bGetFocus> ]
    	 [ ON LOSTFOCUS <bLostFocus> ]
    	 [ ON CHANGE <bChange> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    


The crossplatform alternative is @ <x>,<y> DATESELECT


@ <x>,<y> UPDOWN

    @ <x>,<y> UPDOWN [ <oUpDown> INIT ] <nInit>
    	 RANGE <nLower>, <nUpper>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ WIDTH <nUpdWidth> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> TAB

The setting of colors not yet available (see REDEFINE TAB)
The background color of a tab is forever white.

    @ <x>,<y> TAB [ <oTab> ITEMS ] <aTabs>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ ON CHANGE <bChange> ]
    	 [ ON CLICK <bClick> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    	 [ BITMAP <aBmp> [ FROM RESOURCE] [ BITCOUNT <nBC> ] ]
    

BEGIN PAGE

    BEGIN PAGE <cname> OF <oTab>
    [ TOOLTIP <cTooltip> ]
    

Sample for setting up a tooltip:

@ x, y TAB oTab ITEMS {} SIZE nx, ny

BEGIN PAGE "Tab 1" of oTab Tooltip cTooltip1
...
END PAGE of oTab
BEGIN PAGE "Tab 2" of oTab Tooltip cTooltip2
...
END PAGE of oTab

#ifndef __GTK__
* On WinAPI, the correct tooltip must be synchronized with the shown first tab
* at program start.
oTab:ChangePage(1)
#endif

ACTIVATE WINDOW ...

Advice to mouse position:
The tooltip is forever displayed of the active tab,
if the mouse pointer is positioned on the headline of another tab.
We suggest to add to the headline text the name of the tab in the tooltext string.
This should show the user, for which tab the displayed tooltip is valid.

For details see sample program "demotabtools.prg".


END PAGE, ENDPAGE

Two variants of the same command. End of a TAB page:

    END PAGE OF <oTab>
      èëè  
    ENDPAGE OF <oTab>
    


@ <x>,<y> TREE

    @ <x>,<y> TREE [ <oTree> ]
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ FONT <oFont> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON CLICK <bClick> ]
    	 [ STYLE <nStyle> ]
             [ EDITABLE ]
             [ BITMAP <aBmp>  [ FROM RESOURCE ] [ BITCOUNT <nBC> ] ]
    

4.3.27. INSERT NODE

    INSERT NODE [ <oNode> TITLE ] <cTitle>
    	 TO <oTree>
    	 [ AFTER <oPrev> ]
    	 [ BEFORE <oNext> ]
    	 [ BITMAP <aBmp> ]
    	 [ ON CLICK <bClick> ]
    

@ <x>,<y> BITMAP

    @ <x>,<y> BITMAP [ <oBmp> SHOW ] <bitmap>
             [<res: FROM RESOURCE> ]
                [ OF <oWnd> ]
                [ ID <nId> ]
                [ SIZE <width>, <height> ]
                [ STRETCH <nStretch>]
                [ TRANSPARENT> [COLOR  <trcolor> ]]
                [ ON INIT <bInit> ]
                [ ON SIZE <bSize> ]
                [ ON CLICK <bClick> ]
                [ ON DBLCLICK <bDblClick> ]
                [ TOOLTIP <ctoolt> ]
    

Supported image formats see documentation for CLASS HBITMAP.

The parameters <oBmp> SHOW and SIZE are on GTK mandatory, otherwise the image does not appear ! For details see sample program "bincnts.prg".
For the SIZE parameter pass the real size of the image to display.

Attention !
Do not positionize a BUTTON into the image,
otherwise the ON CLICK block does not work,
for details see sample program "stretch.prg".

Attention !
The object of a bitmap for display is corrupted after first usage.
So need to create the object variable new after usage !
For details look into sample program
samples/bitmapbug.prg
and get information about handling !

TRANSPARENT:
Is yet not usable on GTK !
(bugfix will coming soon).
The parameter can be set, but it is ignored there.

For correct display, a color must be defined for switch to tranparency.
It is strictly recommended, to add the COLOR option.
Default on WinAPI is 0x00FFF, on GTK 0xFFFFFF after bugfix.
A sample program with one transparent bitmap is:
samples\stretch.prg


@ <x>,<y> ICON

    @ <x>,<y> ICON [ <oBmp> SHOW ] <icon>
             [<res: FROM RESOURCE> ]
                [ OF <oWnd> ]
                [ ID <nId> ]
                [ SIZE <width>, <height> ]
                [ ON INIT <bInit> ]
                [ ON SIZE <bSize> ]
                [ ON CLICK <bClick> ]
                [ ON DBLCLICK <bDblClick> ]
                [ TOOLTIP <ctoolt> ]
    

Supported image formats see documentation for CLASS HICON.

Because of bugs in recent version:
GTK:
At this time, the resizing of icons does not work.
The icon is displayed forever in original size.
Will be fixed as soon als possible.
WinAPI:
The SIZE parameter has no effect. Do not use it.
Size parameters must be set at creating HICON object (example calls):
oIcon := HIcon():AddFile(cImgok,75,75)
oIcon := HIcon():AddResource("ICON_1",75,75)
oIcon := HIcon():AddString("ok",cValok,75,75 )

Hint:
Because icons are used normally for display in link on the desktop,
Windows task bar or head bar of a main window or dialog window,
it is recommended not to display an icon in a window.
Please convert the *.ico to *.bmp and use the @ x,y BITMAP command instead.

Background:
The background of an icon is forever transparent. But the
background is forever displayed in white color.


@ <x>,<y> IMAGE

    @ <x>,<y> IMAGE [ <oBmp> SHOW ] <image>
                [ OF <oWnd> ]
                [ ID <nId> ]
                [ ON INIT <bInit> ]
                [ ON SIZE <bSize> ]
                [ TOOLTIP <ctoolt> ]
    

The usage of this command requires the FreeImage library
(as static lib linked in your application or
as shared library like Windows DLL or *.so on LINUX).
If you only need *.bmp or *.jpg, you can use the command
@ <x>,<y> BITMAP without usage of FreeImage.


@ <x>,<y> LINE

    @ <x>,<y> LINE [ <oLine> ]
                [ LENGTH <length> ]
                [ OF <oWnd> ]
                [ ID <nId> ]
                [ VERTICAL]
                [ ON SIZE <bSize> ]
    

@ <x>,<y> RICHEDIT

    @ <x>,<y> RICHEDIT [ <oEdit> TEXT ] <vari>
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ ON INIT <bInit> ]
         [ ON SIZE <bSize> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
         [ ON CHANGE <bChange>]
         [[ON OTHER MESSAGES <bOther>]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
         [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> SPLITTER

    @ <x>,<y> SPLITTER [ <oSplit> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ HSTYLE <oStyle> ]
         [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ DIVIDE  <aLeft> FROM <aRight> ]
         [ LIMITS [<nFrom>][,<nTo>] ]
    

@ <x>,<y> GRAPH

    @ <x>,<y> GRAPH [ <oGraph> DATA ] <aData>
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ ON SIZE <bSize> ]
    	 [ FONT <oFont> ]
         [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> PROGRESSBAR

    @ <x>,<y> PROGRESSBAR <oPBar>
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
         [ BARWIDTH <maxpos> ]
         [ QUANTITY <nRange> ]
    


Direct support for progressbar is WinAPI only.
For LINUX and MacOS an external tool "wmctrl" is needed to
draw progress bars, while program is busy running FOR ... NEXT or
DO WHILE ... ENDDO loops.
A multi platform sample program see directory
samples/progressbar
(TNX to Alain Aupaix)


@ <x>,<y> MONTHCALENDAR

    @ <x>,<y> MONTHCALENDAR [ <oCalendar> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
         [ INIT <dInit> ]
    	 [ SIZE <width>, <height> ]
         [ ON INIT <bInit> ]
         [ ON CHANGE <bChange> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
         [ TOOLTIP <ctoolt> ]
         [ NOTODAY ]
         [ NOTODAYCIRCLE ]
         [ WEEKNUMBERS ]
    


Year range:
- The initial value for MONTHCALENDAR must be delivered of type D.
 So the range from 0 ... 99 was modified to the setting of "SET CENTURY TO ...".
- WinAPI: 1601 ... 9999
- LINUX/GTK: If the month calender is displayed, you can scroll to years out of some limits.
  Values greater than 9999 or negative year values are accepted.
  The leap year rules are processed concerning the rules of the Gregorian calendar,
  but for all years.
  So it make sense, to check the range from 1582 ... 9999 by
  range check for entry fields (for example for VALID functions in GET or simular commands).
  For details about the leap year rules see description of function hwg_IsLeapYear().


@ <x>,<y> LISTBOX

(Windows only)
Because of a bug in GTK, the LISTBOX feature could not be ported to GTK.
For multi platform use the BROWSE class of an array instead.
Look into samples "samples\demolistboxsub.prg" and "samples\TwoLstSub.prg" for usage.
    @ <x>,<y> LISTBOX [ <oList> ITEMS ] <aItems>
         [ OF <oWnd> ]
         [ ID <nId> ]
         [ INIT <dInit> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ ON INIT <bInit> ]
         [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGE <bChange> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
         [ ON KEYDOWN <bKeyDown> ]
         [ ON DBLCLICK <bDblClick> ]
         [[ON OTHER MESSAGES <bOther>]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
         [ TOOLTIP <ctoolt> ]
    

SPLASH

    SPLASH [ <oPBar> TO ] <oBitmap>
                [ FROM RESOURCE ]
                [ TIME <otime> ]
                [WIDTH <w> ]
                [HEIGHT <h> ]
    

@ <x>,<y> TRACKBAR

    @ <x>,<y> TRACKBAR [ <oTrack> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ RANGE <nLow>, <nHigh> ]
         [ INIT <dInit> ]
         [ ON INIT <bInit> ]
         [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGE <bChange> ]
         [ ON DRAG <bDrag> ]
    	 [ STYLE <nStyle> ]
         [ TOOLTIP <ctoolt> ]
         [ VERTICAL ]
         [ AUTOTICKS ]
         [ NOTICKS ]
         [ BOTH ]
         [ TOP ]
         [ LEFT ]
    

@ <x>,<y> ANIMATION

    @ <x>,<y> ANIMATION [ <oAnimation> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ STYLE <nStyle> ]
    	 [ SIZE <width>, <height> ]
         [ FILE <cFile> ]
         [ AUTOPLAY ]
         [ CENTER ]
         [ TRANSPARENT ]
    

@ <x>,<y> GRID

(Windows only)

    @ <x>,<y> GRID [ <oGrid> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ STYLE <nStyle> ]
    	 [ SIZE <width>, <height> ]
         [ FONT <oFont> ]
         [ ON INIT <bInit> ]
         [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
         [ ON KEYDOWN <bKeyDown> ]
         [ ON POSCHANGE <bPosChg> ]
         [ ON DISPINFO <bdisp> ]
         [ ITEMCOUNT <nItemCount> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ NOSCROLL> ]
         [ NOBORDER> ]
         [ NOGRIDLINES> ]
         [ NO HEADER> ]
         [BITMAP <aBit>]
    

ADD COLUMN TO GRID

(Windows only)

    ADD COLUMN TO GRID <oGrid>
         [ HEADER <cHeader> ]
         [ WIDTH <nWidth> ]
         [ JUSTIFY HEAD <nJusHead> ]
         [ BITMAP <n> ]
    

ADDROW TO GRID

(Windows only)

    ADD ROW TO GRID <oGrid>
         [ HEADER <cHeader> ]
         [ JUSTIFY HEAD <nJusHead> ]
         [ BITMAP <n> ]
         [ HEADER <cHeadern> ]
         [ JUSTIFY HEAD <nJusHeadn> ]
         [ BITMAP <nn> ]
    

@ <x>,<y> RECT

(Windows only)

    @ <X>, <Y>, <X2>, <Y2> RECT 
         [ PRESS ]
         [OF <oWnd>]
         [RECT_STYLE <nST>]
    

@ <x>,<y> SAY (LINK)

    @ <x>,<y> SAY [ <oSay> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 LINK <cLink>
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ TRANSPARENT ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bDraw> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
         [ VISITCOLOR <vcolor> ]
         [ LINKCOLOR <lcolor> ]
         [ HOVERCOLOR <hcolor> ]
    

@ <x>,<y> TOOLBAR (GTK only)

    @ <x>,<y> TOOLBAR [ <oTool> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ STYLE <nStyle> ]
    	 [ ITEMS <aItems> ]
    

For multiplatform applications use PANEL and OWNERBUTTON.
For details see sample programs "bincnts.prg and "escrita.prg".


TOOLBUTTON, ADD TOOLBUTTON (GTK only)

    TOOLBUTTON  <oTool> ;
         ID <nId> ;
         [ BITMAP <nBitIp> ];
    	 [ STYLE <nStyle> ]
         [ STATE <bstate>]
         [ TEXT <ctext> ]
         [ TOOLTIP <c> ]
         [ MENU <d>]
         ON CLICK <bclick>
    

For multiplatform applications use PANEL and OWNERBUTTON.
For details see sample programs "bincnts.prg and "escrita.prg".


@ <x>,<y> PAGER

(Windows only)

    @ <x>,<y> PAGER [ <oPager> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ STYLE <nStyle> ]
    	 [ VERTICAL ]
    

@ <x>,<y> REBAR

(Windows only)

    @ <x>,<y> REBAR [ <oRebar> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ STYLE <nStyle> ]
    

ADDBAND <oWnd> TO <oPage>

(Windows only)

    ADDBAND <hWnd> TO <opage>
         [BACKCOLOR <b> ] [FORECOLOR <f>]
         [STYLE <nstyle>] [TEXT <t>]
    

@ <x>,<y> SHAPE

(Windows only)

    @ <x>,<y> SHAPE [ <oShape> ]
         [ OF <oWnd> ]
         [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
         [ BORDERWIDTH <nBorder> ]
         [ CURVATURE <nCurvature>]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ BORDERSTYLE <nbStyle>]
         [ FILLSTYLE <nfStyle>]
         [ BACKSTYLE <nbackStyle>]
         [ ON INIT <bInit> ]
         [ ON SIZE <bSize> ]
    

@ <x>,<y> HCEDIT

    @ <x>,<y> HCEDIT [ <oEdit> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    	 [ STYLE <nStyle> ]
         [ NOBORDER ]
         [ NO VSCROLL ]
    	 [ FONT <oFont> ]
    

@ <x>,<y> TRACK

    @ <x>,<y> TRACK [ <oTrack> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ SLIDER SIZE <nsize> ]
         [ SLIDER HSTYLE <ostyles> ]
         [ BAR HSTYLE <ostyleb> ]
         [<laxis: AXIS>]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    

@ <x>,<y> LENTA

    @ <x>,<y> LENTA [ <oLenta> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
         [ FONT <oFont> ]
         [ ITEMS <aItems> ]
         [ ITEMSIZE <nItemSize> ]
         [ HSTYLES <aItemStyle> ]
    

@ <x>,<y> DATESELECT

    @ <x>,<y> DATESELECT [ <oDate> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ FONT <oFont> ]
         [ INIT <dValue> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGE <bChange> ]
    

@ <x>,<y> BOARD

    @ <x>,<y> BOARD [ <oBoard> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
         [ FONT <oFont> ]
         [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> DRAWN

    @ <x>,<y> DRAWN [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
         [ TEXT <cText> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
    

@ <x>,<y> DRAWN CHECK

    @ <x>,<y> DRAWN CHECK [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
         [ TEXT <cText> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
    

@ <x>,<y> DRAWN RADIO

    @ <x>,<y> DRAWN RADIO [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
         [ TEXT <cText> ]
         [ INIT <lInit> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CLICK <bClick> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
    

@ <x>,<y> DRAWN TRACK

    @ <x>,<y> DRAWN TRACK [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ SLIDER SIZE <nsize> ]
         [ SLIDER HSTYLE <ostyles> ]
         [ BAR HSTYLE <ostyleb> ]
         [ <laxis: AXIS>]
    	 [ ON PAINT <bPaint> ]
    

@ <x>,<y> DRAWN EDIT

    @ <x>,<y> DRAWN EDIT [ <oEdit> CAPTION ] <caption>
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
         [ PICTURE <cPicture> ]
    

@ <x>,<y> DRAWN LENTA

    @ <x>,<y> DRAWN LENTA [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON CLICK <bClick> ]
         [ FONT <oFont> ]
         [ ITEMS <aItems> ]
         [ ITEMSIZE <nItemSize> ]
         [ HSTYLES <aItemStyle> ]
    

@ <x>,<y> DRAWN COMBO

    @ <x>,<y> DRAWN COMBO [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
         [ INIT  <xValue> ]
         [ <lText: TEXT> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGE <bChange> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
         [ DISPLAYCOUNT <nRows>]
    

@ <x>,<y> DRAWN UPDOWN

    @ <x>,<y> DRAWN UPDOWN [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
         [ INIT <xInit> ]           ;
         [ ARRAY <arr> ]            ;
         [ RANGE <nLower>,<nUpper>] ;
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
    

@ <x>,<y> DRAWN BROWSE

    @ <x>,<y> DRAWN BROWSE [ <oDrawn> ]
    	 [ OF <oWnd> ];
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGESTATE <bChg> ]
         [ FONT <oFont> ]
         [ <lVscroll: VSCROLL> ]    ;
         [ <lHscroll: HSCROLL> ]    ;
    

@ <x>,<y> DRAWN DATE

    @ <x>,<y> DRAWN DATE [ <oDate> ]
    	 [ OF <oWnd> ];
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
         [ HSTYLES <aStyles> ]
         [ FONT <oFont> ]
         [ INIT <dValue> ]
    	 [ ON PAINT <bPaint> ]
         [ ON CHANGE <bChange> ]
         [ ON CHANGESTATE <bChg> ]
    
4.4. Get system commands

Get system doesn't use a special class, something like HGet. It uses the same control classes ( HEdit, HCheckButton, etc. ), as usual control creating commands, only add there some new behavour.


@ <x>,<y> GET

    @ <x>,<y> GET [ <oEdit> VAR ] <vari>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ PICTURE <cPicture> ]
    	 [ WHEN <bWhen> ]
    	 [ VALID <bValid> ]
         [ NOBORDER ]
         [ PASSWORD ]
         [ MAXLENGTH <lMaxLength> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

Additional instructions for GET:
VALID: use always a block term, otherwise the GET command crashes with EVAL error,
for example:
11,22 GET cVar VALID { | | valid_func(cVar) }

For fixing a special GET problem on GTK look for function hwg_GET_Helper() in the
function documentation.
There you find the description of the symptom and the instructions for fix.

More special problems:
1.) PICTURE in GET statement
If your dialog uses in the last GET command a PICTURE clause,
the dialog is closed immediately, if the end of field is filled and reached.
To avoid this, use the NOEXIT clause in INIT DIALOG command.

2.) Obscure behavior entering ASCII characters with "Alt Gr" key.
Very important !!!
To avoid side effects while entering characters only reachable by "AltGr" key
( for example on german keyboard layout: ~µ@{[]}\€ ),
be shure that the size of the GET control field (X value of SIZE parameter)
is big enough to display all characters of edit field.
The symptom is, that the character is ignored and on Windows
a ding sound appears.

More information:
The solution is very simple, be shure, that the SIZE of the input field is so dimensioned, that can accommodate all characters. For details see instructions in the
comment line of sample program "demostrrev.prg".
Here a screenshot from this program to
demonstrate how to check.
GET check SIZE

3.) Euro currency sign (€)
How to handle the input of the Euro sign with GET statement
and display it with SAY see instructions in the
comment line of sample program "demostrrev.prg".
For more information about this item,
and storing this character in DBF's
look into source code of "CLLOG"
(https://sourceforge.net/projects/cllog/)

Important:

GET commands started with overwrite mode for editing.
Set
 READINSERT(.T.)
to switch to insert editing mode.
The best way is, to insert this command into the main section in your
HWGUI application as one of the first commands.

Scrolling feature with PICTURE "@Snn" is not supported.

On GTK, it is possible, that the complete modified value
is not stored in the variable.
For test of display length, enter a number string like
"12345678901234567890 ...." with the desired length in C type fields.
Add a security reserve of 5 ... 10%.
For empty fields initialize the variables with empty values
like these examples before use of the GET command:

cField := SPACE(30)
dField := CTOD("") or better with todays date : dField := DATE()
nField := 0
lField := .F.

For editing MEMO type fields use the HCEDIT class.

Parameters COLOR and BACKCOLOR for GTK,
(Color setting for foreground (text color) and background):


In GET entry fields the colors can not be modified.
See GTK 2 reference for gtk_entry_* class.
There are no parameters "color" explained.
Sorry, we must wait, if this feature is realized in future versions of GTK.

Here screenshots for sample command
"@ x, y GET oGet VAR cGet COLOR hwg_ColorC2N("FF0000") SIZE xx,yy":

WinAPI:
GET color WinAPI
Windows GTK cross development environment:
GET color WinGtKCrossEnv
LINUX:
GET color LINUX


More restrictions on GTK:
1.) VALID: Outputs in the called VALID functions are not displayed
(functions like hwg_MsgInfo() or hwg_MsgStop() )
2.) MAXLENGTH:
The Input field can be filled with more characters than with the
parameter MAXLENGTH defined, but they are not stored in the variable.
Moving the focus to another input field and go back to the input field
with the length rectricted field, the content is displayed with the defined MAXLENGTH.
3.) The function hwg_SetColorinFocus() does not work correct.
The entry field in focus became only a simple border.


@ <x>,<y> GET CHECKBOX

    @ <x>,<y> GET CHECKBOX [ <oEdit> VAR ] <vari>
             CAPTION  <caption>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ TRANSPARENT ]
    	 [ VALID,ON CLICK <bValid> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    	 [ WHEN <bWhen> ]
    

@ <x>,<y> GET COMBOBOX

    @ <x>,<y> GET COMBOBOX [ <oCombo> VAR ] <vari>
         ITEMS ] <aItems>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON CHANGE <bChange> ]
         [ WHEN <bWhen> ]
         [ VALID <bValid> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ EDIT ]    (Windows only)
    	 [ TEXT ]
    	 [ TOOLTIP <ctoolt> ]
    	 [ DISPLAYCOUNT <nDisplay>]
    

GET RADIOGROUP

       GET RADIOGROUP [ <ogr> VAR ] <vari>
    

@ <x>,<y> GET RADIOGROUP

       @ <x>,<y> GET RADIOGROUP [ <ogr> VAR ] <vari>
         [ CAPTION  <caption> ]
    	 [ OF <oWnd>]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ FONT <oFont> ]
    	 [ STYLE <nStyle> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    

@ <x>,<y> GET DATEPICKER

    @ <x>,<y> GET DATEPICKER [ <oPick> VAR ] <vari>
    	 [ OF <oWnd>]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ WHEN <bWhen> ]
    	 [ VALID <bValid> ]
    	 [ ON CHANGE <bChange> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

@ <x>,<y> GET UPDOWN

    @ <x>,<y> GET UPDOWN[ <oUpDown> VAR ] <vari>
    	 RANGE <nLower>, <nUpper>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ WIDTH <nUpdWidth> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ PICTURE <cPicture> ]
    	 [ WHEN <bWhen> ]
    	 [ VALID <bValid> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
    

GET IPADDRESS

    @ <x>,<y> GET IPADDRESS [ <oIp> VAR ] <vari>
    	 [ OF <oWnd>]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ ON GETFOCUS <bGfocus> ]
    	 [ ON LOSTFOCUS <bLfocus> ]
    

GET LISTBOX

    @ <x>,<y> GET LISTBOX[ <oList> VAR ] <vari>
    	 ITEMS <aItems>
    	 [ OF <oWnd> ]
    	 [ ID <nId> ]
    	 [ SIZE <width>, <height> ]
    	 [ COLOR <tcolor> ]
    	 [ BACKCOLOR <bcolor> ]
    	 [ ON INIT <bInit> ]
    	 [ ON SIZE <bSize> ]
    	 [ ON PAINT <bPaint> ]
    	 [ ON CHANGE <bChg> ]
    	 [ WHEN <bWhen> ]
    	 [ VALID <bValid> ]
    	 [ STYLE <nStyle> ]
    	 [ FONT <oFont> ]
    	 [ TOOLTIP <ctoolt> ]
         [ ON KEYDOWN <bKeyDown> ]
         [ ON DBLCLICK <bDblClick> ]
         [[ON OTHER MESSAGES <bOther>]
    

4.4.13. SET KEY

     SET KEY <nctrl>, <nkey> [ OF <oDlg> ] [ TO <func> ]
    

4.5. Print commands

Attention !
Some trouble with printing of bitmaps, for details see class documentation of
CLASS HWINPRN !


INIT PRINTER

    INIT PRINTER <oPrinter>
             [ NAME <cPrinter> ]
             [ PIXEL ]
    

INIT DEFAULT PRINTER

    INIT DEFAULT PRINTER <oPrinter>
             [ PIXEL ]
    

4.6. Other commands
SET TIMER

    SET TIMER [ <oTimer> ]
    	 [ OF <oWnd> ]
    	 [ ID <id> ]
    	 VALUE <value>
    	 ACTION <bAction>
    

SET RESOURCES TO

       SET RESOURCES TO [<cName>]
    

SET RESOURCES CONTAINER TO

Opens a file cName of a binary container and sets is as a current fot resources retrieving. Appropriate function: hwg_SetResContainer( cName )

       SET RESOURCES CONTAINER TO [<cName>]
    

PREPARE FONT

    PREPARE FONT <oFont>
         NAME <cName>
         [ WIDTH <nWidth> ]
         [ HEIGHT <nHeight> ]
         [ WEIGHT <nWeight> ]
         [ CHARSET <charset> ]
         [ ITALIC ]
         [ UNDERLINE ]
         [ STRIKEOUT ]
    

prev table of contents next
introduction   functions