16.10 Look & Feel
You can modify the default controls, styles, menus, and toolbars by constructing appropriate XML files and transmitting them to the display client using sendfile_to_ui().
VDC expects these files to have the suffixes:
-
.4st for style files
-
.4sm for start menus
-
.4tb for toolbars
-
.4ad for actions
There are some examples below to help you.
The Toolbar is is sent via a XML-File (extension .4tb) to the Client by the sendfile_to_ui command()
Its structure is:
<ToolBar buttonTextHidden="0/1" iconHidden="0/1"
hidden="0/1" buttonTextPosition="beside/under">
<ToolBarItem name="actionname" image="image.ext"
text="Text" comment="Tooltip" />
<ToolBarSeparator/>
</ToolBar>
Images have to reside inside a subdirectory pics or images or must be in the DBPATH/pics or DBPATH/images
16.10.3 Application Launcher
The StartMenu is is sent via a XML-File (extension .4sm) to the Client by the sendfile_to_ui command
Its structure is:
<StartMenu text ="RootElementText">
<StartMenu text ="RootElementText">
<StartMenuGroup text ="RootNodeText">
<StartMenuCommand text ="ChildNodeText"
exec ="Command to Execute" />
</StartMenuGroup>
</StartMenu>
You can define different Menustyles for the Menu, at the moment there is a "tree-menu" or a menubar.
The Style can be defined with the Style attribute in 4gl or within the styles xml file with the startMenuPosition parameter
Styles are sent via a XML-File (extension .4st) to the Client by the sendfile_to_ui command
Its structure is:
<StyleList>
<Style name="sytlename" >
<StyleAttribute name="attributename"
value="attributevalue" />
</Style>
</StyleList>
The Stylename can be one of the following:
-
* (matches everything)
-
a style name (should be referenced as style attribute in 4gl)
-
an elementtype (e.g. ButtonEdit)
-
stylename.elementtype
-
(stylename.)elementtype:modifier (e.g. ButtonEdit:focus)
The Stylelist can contain many different styles.
Colour values can be defined in CSS or RGB values
|
Attribute
|
Value
|
Description
|
|
startMenuPosition
|
menu | tree
|
Display startmenu as Tree or Filemenu
|
|
ringMenuPosition
|
none | top | bottom | left | right
|
Position of the Ringmenu
|
|
actionPanelPosition
|
none | top | bottom | left | right
|
Position of the actionpanel
|
|
toolBarPosition
|
none | top | bottom | left | right
|
Position of the toolbar
|
|
color
|
RGB or CSS
|
Value Color of text
|
|
background-color
|
RGB or CSS
|
Value Backround color
|
|
hideButtons
|
yes | no
|
Hide Option hides or just disable menubuttons
|
|
windowType
|
normal | modal
|
Sets the windowtype to normal or modal
|
|
Modifier
|
Description
|
|
:active
|
This state is set when the widget is in an active window
|
|
:enabled
|
This state is set when the widget is enabled
|
|
:disabled
|
This state is set when the widget is disabled
|
|
:focus
|
The item has input focus
|
|
:hover
|
the mouse is hovering over the item
|
|
:read-only
|
The item is read-only
|
Actions are sent via an XML File (extension .4ad) to the Client by the sendfile_to_ui command
<ActionDefaultList>
<ActionDefault name="actionname" attribute="attributevalue" />
</ActionDefaultList>
With the Actions file you can define default attributes for interactive Actions like Menubuttons or ON KEY or ON ACTION events or the Toolbar.
You can define more than one attribute for an Action but the name attribute is mandatory.
|
Attribute
|
Value
|
Description
|
|
name
|
String
|
defines the actions name
|
|
text
|
String
|
if a button is displayed this is the buttons text
|
|
comment
|
String
|
this defines the tooltip
|
|
image
|
String
|
name of the image that is to be shown
|
|
defaultView
|
yes/no/auto
|
show button in the action panel or not
|
|
acceleratorName
|
String
|
1st shortcut name
|
|
acceleratorName2
|
String
|
2nd shortcut name
|
|
acceleratorName3
|
String
|
3rd shortcut name
|
|
acceleratorName4
|
String
|
4th shortcut name
|
|
acceleratorName5
|
String
|
5th shortcut name
|
The Acceleratornames can be
-
a-z
-
0-9
-
F1-F35
-
Control-Shift
16.10.4 SSH client mode
Details to be supplied