Customizing the Panel Elements
The user interface contains a standard graphic layout, which utilizes predefined elements such as colors and other features. You can modify these elements in the Planning application to suit the requirements in your factory.
This section covers these topics:
PSUI.INI File
The graphic user interface application extension or PSUI.INI file contains user interface facilities that are common to most panel files.
The PSUI.INI file controls the behavior of the user interface system and defines the elements of the panel. It has the three parts [SYSTEM], [COLOR] and [FONT].
The PSUI.INI is located in the Planning application System directory. An alternative path to the PSUI.INI file can be defined by the PSUI_INIPATH environment variable. Comment lines begin with an exclamation sign. [!]
This section includes these topics:
Logic
You can include some logic in the INI file as follows:
#if hresolution gets the current screen resolution in pixels and checks if it is within the interval given by <horizontal screen resolution in pixels> ± 50 pixels.
#if hresolution = <horizontal screen resolution in pixels>
#else
#endif
#if truecolor gets the current color resolution and checks if it is truecolor, for example, above 256 colors.
#if truecolor
#else
#endif
Negation of truecolor is possible:
#if not truecolor
#else
#endif
System
The system group controls the message level, image path, application title, status bar size, and the dialog window width and height factors.
The following example is used to explain the system group controls.
[SYSTEM] messages = no environment = movex !application_title = !image_path = N:\APP11_1\IMAGES;N:\MVXAPP11\LINK\WINDOWS\INSTALL\IMAGES !y_offset = -5 statusbar_version_width=25 statusbar_clock_width=130 statusbar_status_width=350 statusbar_license_width=200 #if hresolution = 1280 width_factor = 50 height_factor = 90 #endif #if hresolution = 1152 width_factor = 50 height_factor = 90 #endif #if hresolution = 1024 width_factor = 70 height_factor = 110 #endif #if hresolution = 800 width_factor = 90 height_factor = 140 #endif
- Messages: Messages
controls the message level. It is only used for debugging purpose. If set to
yes a message box will indicate if a UI
error occurs. Call to void NTApplication::reportError(const PSErrorInfo
&info) const in
PSUI.DLL.
messages = no | yes
image_path = <paths>
- Application title:
application title controls the text in the MAPP main window title bar.
application_title = <text>
- Image_path: Image path
overrides the path set by the environment variable PSUI_IMAGEPATH. The path can
be a double path, where first path is to a customer image directory and the
second the standard image directory.
image_path = c:\program files\MvxApp11_1\images\custom;c:\program files\MvxApp11_1\images;
If a folder named 256 is defined in the either of the image directories, the images placed in these folders are preferred, if the color resolution is set to 256 colors.
- Status bar: a status
bar is placed at the bottom of the Planning application main window.
These settings ensure that the status and license parts are only shown when the user is in the
If these settings are removed from the menu. In the other menus ( menu and menu) this information is hidden to provide enough space for the color information. PSUI.INI, file all menus will look like the menu. -
The size of the legend/information part is approximately the main window width (statusbar_license_width + statusbar_status_width + statusbar_clock_width + statusbar_version_width).
The license, status, clock and version parts are fixed sized. If a width is set to zero pixels, the part is not shown.
statusbar_license_width = <pixels>
statusbar_status_width = <pixels>
statusbar_clock_width = <pixels>
statusbar_version_width = <pixels>
-
Width factor: The width_factor and height_factor controls the proportions of the dialogs in different resolutions.
width_factor = <integer factor>
height_factor = <integer factor>
If, for example, the horizontal screen resolution is 800 pixels, the following factors will be set.
#if hresolution = 800
width_factor = 90
height_factor = 140
#endif
If the width_factor is changed from 90 to 80 and the height factor from 140 to 130, a more compressed dialog is obtained. Note that the size of the controls have not been changed.
#if hresolution = 800
width_factor = 80
height_factor = 130
#endif
Color
The color group defines the color index palette.
Example:
[COLOR] ! R G B ! --- --- --- color0 = 1, 1, 1 Black* color1 = 254, 0, 0 Red* color2 = 0, 129, 0 Dark green* color3 = 254, 254, 0 Yellow* color4 = 0, 0, 254 Blue* color5 = 254, 0, 254 Magenta* color6 = 0, 254, 254 Cyan* color7 = 193, 193, 193 Light grey* !---------------------- color8 = 129, 129, 129 Medium grey* color9 = 0, 0, 129 Dark blue* color10 = 129, 0, 0 Dark red* color11 = 129, 0, 129 Dark magenta* color12 = 0, 254, 0 Green* color13 = 0, 129, 129 Dark cyan* color14 = 129, 129, 0 Dark yellow* color15 = 254, 254, 254 White* !---------------------- color16 = 250, 250, 250 2% grey color17 = 242, 242, 242 5% grey color18 = 224, 224, 224 12% grey color19 = 184, 184, 184 28% grey color20 = 160, 160, 160 Light grey* color21 = 119, 119, 119 53% grey color22 = 96, 96, 96 62% grey color23 = 77, 77, 77 70% grey . . . color74 = 255, 204, 255 color75 = 249, 108, 181 color76 = 255, 79, 121 color77 = 215, 0, 0 color78 = 185, 56, 0 color79 = 114, 75, 0 !---------------------- #if truecolor color80 = 90, 90, 165 #else color80 = 0, 0, 129 #endif listbox_background_color_index = 15 #if truecolor listbox_selection_color_index = 47 threshold_value1 = 0 threshold_color_index1 = 52 threshold_value2 = 100 threshold_color_index2 = 75 #else listbox_selection_color_index = 50 threshold_value1 = 0 threshold_color_index1 = 50 threshold_value2 = 100 threshold_color_index2 = 75 #endif procentagebar_text_color_index = 22 color<index> = <Red value>, <Green value>, <Blue value>
A color index is used to refer to a specific color. Color indexes 0 to 15 are mapped to hardware colors. Color index 0 should always be black, index 7 pale gray (background color) and index 15 should be white.
Color indexes 0 to 79 can be used for coloring.
Indexes 80 to 99 are reserved for special purposes - currently only index 80 is used to handle a color problem at 256 colors. The background bitmap color that is used in the main menu is a palette color, which the text label control can not use at 256 colors.
Indexes 100 to 199 are system colors that are used for defaults.
Color selection dialog (#674) in MAPP | The panel definition in PMGENE__.SKM |
---|---|
Color |
#674;1;-1;-2;-3;01;00;79; @@28;SW1P0;5;23;100;12;120;; @@24;04;2;00;?0;"Farve_0";4;;L07T;;;~1;00;F0; @@24;05;2;01;?0;"Farve_1";4;;L07T;;;~1;01;F0; @@24;06;2;02;?0;"Farve_2";4;;L07T;;;~1;02;F0; . . . @@24;81;2;77;?0;"Farve_77";4;;L07T;;;~1;77;F0; @@24;82;2;78;?0;"Farve_78";4;;L07T;;;~1;78;F0; @@24;83;2;79;?0;"Farve_79";4;;L07T;;;~1;79;F0; @@29;Line;1;7;;;EHSh;0; @@24;Luk;1;7;?0;"Luk";;3;SL02TF3;.ICO=13;CN;T;F3; @@24;Hjælp;1;7;?0;"Hjælp";2;3;SL02TH;.ICO=71;LM; @@13;*1;50;*2;2;*3;150;*4;2;*5;30;*6;0;T; $Luk&_$Hjælp_& $Line& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& ~1_&~1_&~1_&~1_&~1_&~1_&~1_&~1_& |
List box_background_color_index = <color index>
List box_selection_color_index = <color index>
List box_background_color_index sets the default background color index of the listbox. If a specific color index isnt defined on the listbox, this color index is used.
List box_selection_color_index set the default selection color index of the listbox. If a specific color index isnt defined on the listbox, this color index is used.
threshold_value1 = <integer threshold value>
threshold_color_index1 = <color index>
Threshold_value1 to threshold_value15 defines the threshold value used to select the color that is used the percent bar in the list box. If the value is less or equals the threshold_value1 then threshold_color_index1 is used as color.
procentagebar_text_color_index = <color index>
Procentage bar_text_color_index sets the color of the text in the percentage bar.
Font
The font group defines the fonts and defaults available.
Example:
[FONT]
font1 = 10, Courier New, normal
font2 = 8, Arial, normal
font3 = 10, Arial, normal
font4 = 3, Arial, normal
font5 = 4, Arial, normal
font6 = 5, Arial, normal
font7 = 6, Arial, normal
font8 = 7, Arial, normal
font9 = 6, Arial, normal
font10 = 6, Arial, normal
font11 = 10, Arial, normal
font12 = 10, Arial, normal
font13 = 13, Arial, normal
font14 = 18, Arial, bold
font15 = 18, Times New Roman, italic
pushbutton_font =" " 9, arial , normal
radiobutton_font = 9, arial , normal
listbox_header_font = 8, arial , normal
listbox_body_font = 8, arial , normal
default_printer_font = 9, arial , bold
font<index> = <Size>, <Name>, <Style>
Font index is used to refer to a specific font. Font indexes 0 to 30 can be used to define the font; currently 0 to 15 is defined. Font indexes 31 to 99 are system fonts used for defaults.
<Size> is the point size.
<Name> is the font name.
<Style> cannot be normal, bold or italic.
pushbutton_font = <Size>, <Name>, <Style>
radiobutton_font = <Size>, <Name>, <Style>
listbox_header_font = <Size>, <Name>, <Style>
listbox_body_font = <Size>, <Name>, <Style>
These sets the default font that is used for the control.
default_printer_font = <Size>, <Name>, <Style>
This sets the default font that is used when printing non-list box information.
Bitmaps
Bitmaps are contained in background images and other graphic windows. Bitmaps can also be used as buttons but, because bitmaps do not show the disabled state, icons are preferred to buttons.
Size: No limit
Colors: At least 256 colors
Extension: BMP
Bitmap | BMP# | Description |
---|---|---|
115 | Portrait | |
116 | Landscape |
The bitmaps are located in the System\Images directory in the installation path.
AVI
AVI (Audio/Video Interleave) is the file format that is used by Video for Windows, a video technology that is used on personal computers. In AVI, picture and sound elements are stored in alternate interleaved chunks in the file.
In the Planning application, AVIs are used to create exceptional graphics.
Size: No limit
Colors: At least 256 colors
Extension: AVI
AVI# | Description | |
---|---|---|
1 | Saving schedule | |
2 | Reading schedule | |
3 | Logon to server | |
4 | Importing data | |
5 | Exporting data | |
6 | Copying files |
The AVIs are located in the System\Images directory in the installation path.
Cursors
You can also use animated cursors (*.ANI). The cursor is used when a the Planning application pop-up menu is available.
Size: 32 x 32 pixels
Colors: Monochrome
Extension: CUR / ANI
Cursor | CUR# | Description |
---|---|---|
101 | Zoom in | |
107 | Select | |
108 | Place operation | |
111 | To interval | |
112 | From interval | |
116 | Job report |
The cursors are located in the System\Images directory in the installation path.
Icons
Icons are used for toolbar buttons. They can be shown in disabled state. Icons can not be smaller or larger than 16 x 16 pixels.
Size: 16 x 16 pixels
Colors: 16 colors
Extension: ICO
Icon | ICO# | Description |
---|---|---|
69 | Show detail | |
70 | Properties | |
112 | Color |
The icons are located in the System\Images folder in the installation path.
Image Resources That Are Used by the System
The image resources (cursors, icons, bitmaps and AVIs) used in the Planning application are loaded from start of the application.
The path to the image resources can be set in two ways:
- Using environment variable PSUI_IMAGEPATH.
- Using [SYSTEM] image_path in PSUI.INI
Method 1 is standard. Method 2 overrides 1.