-
Notifications
You must be signed in to change notification settings - Fork 3
Guidelines_FiveLinux_users.
(Return to xBase commands page.)
-
Creates a window of a certain size (width by height in pixels), with title and options menu. This window will be created, but not activated. The created object has been placed in the variable oWnd.
-
Activates the oWnd object. It not only activates the window but also tells it to be maximised or not, depending on whether the MAXIMIZED option is declared. Between definition and activation, the object can be modified so that, at the time of activation, it starts with the changed values.
#include "FiveLinux.ch" PROCEDURE Main() F_Window() FUNCTION F_Window() LOCAL oWnd LOCAL cTitle := "WINDOW" LOCAL nWidth := 640, nHeight := 480 DEFINE WINDOW oWnd; TITLE cTitle; MENU F_BuildMenu(); SIZE nWidth, nHeight ACTIVATE WINDOW oWnd CENTERED RETURN FUNCTION F_BuildMenu() LOCAL oMenu MENU oMenu MENUITEM "One" MENU MENUITEM "One->one" MENU MENUITEM "One->one->1" MENUITEM "One->one->2" SEPARATOR MENUITEM "One->one->3" ENDMENU MENUITEM "One->two" ENDMENU MENUITEM "Two" ACTION MsgInfo( "Two" ) MENUITEM "Three" ACTION MsgInfo( "Three" ) ENDMENU RETURN oMenu
(Return to xBase commands page.)
-
This window serves as a container for other elements; the minimise and maximise buttons are not present.
-
Activates the oDlg object.
#include "FiveLinux.ch" PROCEDURE Main() F_Dialog() FUNCTION F_Dialog() LOCAL oDlg LOCAL cTitle := "DIALOG" LOCAL nWidth := 640, nHeight := 480 DEFINE DIALOG oDlg; TITLE cTitle; SIZE nWidth, nHeight ACTIVATE DIALOG oDlg; CENTER; RETURN nil
(Return to xBase commands page.)
-
Defines a button bar in a window. The constructed element will be the container for the buttons and can be placed on any of the four sides of the window or even form a floating box with the buttons inside. A button bar must have at least one button for it to be practical, but it can be designed without any, as the bar only serves as a container. All ACTION functions, etc. must be on each specific button. As a clause proper to a button within a button bar, there is GROUP, which indicates that it must be separated a little from the preceding button.
-
Define the buttons in the button bar.
Example 1: The button bar at the bottom of the window without menu, with literals in the description of each button.
#include "FiveLinux.ch" PROCEDURE Main() ButtonBar() FUNCTION ButtonBar() LOCAL oDlg, oBar LOCAL; cTitle := "Button bar",; cAdd := "Add record",; cDelete := "Delete record",; cModify := "Modifyrecord",; cButton1 := "Add",; cButton2 := "Delete",; cButton3 := "Modify",; cButton4 := "Exit",; cInfo1 := "Registration has been completed",; cInfo2 := "Record has been deleted",; cInfo3 := "The register has been modified" DEFINE DIALOG oDlg TITLE cTitle SIZE 640, 480 DEFINE BUTTONBAR oBar OF oDlg DEFINE BUTTON; LABEL cAdd; IMAGE cButton1 OF oBar; ACTION MsgInfo( cInfo1 ) DEFINE BUTTON; LABEL cDelete; IMAGE cButton2 OF oBar; ACTION MsgInfo( cInfo2 ) DEFINE BUTTON; LABEL cModify; IMAGE cButton3 OF oBar; ACTION MsgInfo( cInfo3 ) DEFINE BUTTON; IMAGE cButton4 OF oBar; GROUP ACTION oDlg:End() ACTIVATE DIALOG oDlg CENTERED RETURN nil