Upload
alan-haynes
View
214
Download
1
Embed Size (px)
Citation preview
NOMADS Enhancements Presented by:Yvonne
Sampson
Presentation Overview
• Menu Colours• Numeric Check Boxes
• Multiple Character Translation Values for Drop Boxes, Grids and List Boxes
• COM Control Enhancements • Embedded Panels• Alternate Screen Layouts• New Folder Design Interface• Auto Detection of Folder Contents • Tabless Folders• New Folder Object
Menu Colours
• Colour support added to menu bars and popup menus
• Can apply to two areas giving a two-tone appearance• Left edge – bitmap portion of the menu• Individual menu entries – text background
• Special Colour Options• Menu Default• System Default
• New IDE for Menu Definition
Menu ColoursSpecial Colour Options
• Menu Default• Colour setting for the entire menu• Can be applied to individual menu
entries
• System Default• Uses Windows system colours• Can be applied to entire menu and
individual menu entries
Menu ColoursNew Interface for Menu Definition
• Folder control displays menu item, group and link information
• Attributes tab contains bitmap and text background colour
Menu ColoursDefining Default Menu Colours
• Turn on the Text Background/Left Edge check box in the main panel of the menu definition
Menu ColoursDefining Default Menu Colours
• Press the colour palette button
Menu ColoursDefining Individual Menu Item
Colours
• Sample panel for menu item File/Save
Menu ColoursSetting Colours at Application Level
• Special NOMADS global variables• %NOMAD_MENU_LEFTEDGE_CLR$ - Left edge
colour• %NOMAD_MENU_TEXTBACKGROUND_CLR$ - Text
background colour
• Colour settings in the menu definition will override the global settings
• Control name directly affects the variable
• No need to load string with check box value
• New attribute called Numeric added to check box definition
• Default setting is off
Numeric Check Boxes
• Supported Controls• Drop Boxes, Grids • List Boxes - Standard, Formatted, List Views
(report and list format)
• Variable Drop Boxes/List Boxes not supported
• New Translation Length Properties• Represents length of each of the items in the
translation table• Setting it to zero indicates that the translation
table contains a delimited string with the last character of the string being the delimiter character
• Grids - ‘CellTblWidth• Drop Boxes/List Boxes - ‘TblWidth
Multiple Character Translation Values
• No changes to Grid Definition• ‘CellTbl$ and ‘CellTblWidth added to the
Property drop box in the Presets panel
• New interface for Translation Definition • List Boxes and Drop Boxes Only
Multiple Character Translation Values
Defining Translation Values for Drop Boxes/List Boxes
• New multi line field Table Length Value added to the Values panel of the drop box/list box definition in the designer and the Data Class Maintenance Utility• Default value is 1• Positive values only• Format mask is ###0
• Translation values can be Fixed or an Expression• Fixed values
• Loaded in grid control (replaces List Box)
• Expression• Use a delimiter between each value• Last character represents the delimiter• Table Length Value is automatically set to zero• For example, the variable Values$ contains “V1/V2/V3/”
Multiple Character Translation Values
Defining Translation Values for Drop Boxes/List Boxes
• Use the up/down arrow buttons to re-order the translation values
• New variables for translate length• OBJ_TBL_LEN – Screen library• CLS_TBL_LEN – Data Class file (Providex.dcl)
Multiple Character Translation Values
• New Interface for COM definition• Parent and sub-objects loaded into a tree view
control• Properties/Methods/Events are grouped on one
tab for easy access
• More detailed description of property typeProperty Types:• Num|Str, Num, Str, pNum|Str, pStr, pNum, Meth,
Obj, pObj, pArray, Array. Where p indicates a ProvideX property or object.
COM Control Enhancements
• Drill down on sub-objects using tree view control• Properties/Methods/Events are automatically
loaded for the selected object
• Resizable Panel• Setup simple methods at design time
• For example, opening a Word document:Word_Ocx’Documents’Open(“c:\tmp\ocx.doc”)
COM Control Enhancements
COM Control Enhancements
Handling more Complex Methods
• Use an OOP object to intercept parameters passed by the COM control
• Assign the OOP object in Post-Create Logic
• Enter the Program/Entry point that will be performed, called or executed after the COM control is created
COM Control Enhancements
• Panels containing common controls that are used on various other panels throughout an application
• Create one panel with common controlsFor example:• Common format for first, prior, next and last push
buttons
• Multiple panels can be embedded• Panel can contain all available control types• Save valuable development time
Embedded Panels
Note: The header definition in the embedded panel is not carried forward.
Note: The header definition in the embedded panel is not carried forward.
Assigning Embedded Panels
• Activate the Embedded Panel option using one of the following choices• Select the menu item called Embed Panel in the
Controls menu group • Select the radio button with the text [Embed
Panel] in the Controls window • Popup menu item (right click in blank area of
panel)
• Define an area for the Inherited controls • Select a panel from the Embed Panel window
Embedded Panels
Assigning Embedded Panels
• Frame containing name of selected panel will be drawn• Warning message displayed if controls will not
fit in the designated region
• Frame indicates where the controls will be drawn at runtime
Embedded Panels
What happens at runtime?
• *winproc will draw the controls on the current active panel
• No warning message will be displayed if the panel does not exist
• Controls that have duplicate names will not be drawn• A warning message will display the
duplicate control name then retrieve the next control for that panel - this is only displayed once
Embedded Panels
• Users can switch from one panel layout to another at runtimeFor Example:• Given a line order entry panel containing dual
grid entry, a user may want to view the grids vertically or horizontally. To setup this scenario:• Create two panels (one for the wide view and one
for the narrow view)• Use a button control to toggle between the views
• Alternate screen can be a free standing panel or a sub-panel within a folder control
• Same controls/attributes/logic must exist on the alternate panel• Only difference is the control size and placement
Alternate Screen Layouts
Using Alternate Screen Layouts
• New NOMADS variables • Alternate_Panel$• Alternate_Panel_Type$
• Defaults to the parent - set to “F” if panel exists in a folder
• Alternate Panel must exist in same library• Folder region too small on parent panel
• Create 2 alternate panels (parent and sub-panel)• Example
Alternate_Panel$=”Mainw;Folderw”Alternate_Panel_Type$=”MF”
Where“M“ refers to the parent panel“F” identifies the sub-panel
Alternate Screen Layouts
• Tab information stored in a separate sub-panel called Tabs
• Grid control used to display Tab information
• Resizable definition screen
• Information relating to the entire folder control is now contained in the Display tab
New Folder Design Interface
• Use the Insert button to insert a blank row in the grid • Defaults are set for the title format, fill pattern
and fill colour1
• Multiple tab definitions can be removed by highlighting one or more rows in the grid and pressing the Delete button
• Use the up/down arrow buttons to change the order of the tabs
New Folder Design Interface
New Folder Design Interface
• Set up specific tabs to be suppressed at runtime if the panel doesn’t exist or a security check fails
• One folder definition can be used for multiple users• Customizable folders
• Tabs will only be included if sub-panel exists in the installed library
• If one tab exists then a tabless folder is drawn
• Security levels checked at runtime• Setting up auto detection of folder
contents
Auto Detection of Folder Contents
Set Up
• Turn on the Suppress If Not Found check box in the tab definition grid
• In the Display panel of the folder definition select the frame style that will outline the folder region• Frame style can be a fixed value or an expression• Available styles: None, 3d frame (default),
recessed frame, or raised frame
Auto Detection of Folder Contents
Note: The frame style is only used if (at runtime) only one sub-panels exists.
Note: The frame style is only used if (at runtime) only one sub-panels exists.
Set Up
• If using an expression to set frame style• Format values include
0 = None (no frame required)2 = 3d frame3 = Recessed frame4 = Raised frame
• For example, setting %FrameType$="3" results in a recessed frame being drawn around the folder region
Auto Detection of Folder Contents
• Folders with no visible tabs • Similar to a wizard-style approach• Frame surrounds folder region• Application uses browse buttons
(next/prior) to display the tabs • Use NOMADS variable Next_Folder; e.g.,
Next_Folder=Fldr.panelname.ctl
• Panel Resizing/Persistence are supported
Tabless Folders
Defining Tabless Folders
• Set Tabless Folder check box in the Tab panel of the folder definition• Can also be set in the Display panel
• Assign sub-panels• Press the arrow button in the Name column
to retrieve a list of available panels for the current library
Tabless Folders
Tabless Folders Defining Tabless Folders
• In the Display panel of the folder definition select the frame style that will outline the folder region• Frame style can be a fixed value or an
expression• Available styles: None, 3d frame (default),
recessed frame, or raised frame
Tabless Folders What happens at runtime?
• Security levels checked per user• Security levels assigned in panel header
definition• Sub-panel included if user has full access
• Sub-panel activated using Next_Folder • Default is the first sub-panel assigned in the
folder definition
• Used to draw and manage folders
• More flexible• Developers can customize the folder look
and feel for their application
• Change Folder and Tab information at runtime
• Many properties and methods
• Panel Resizing/Persistence supported
• Many _F_ *winproc tables are now obsolete• Object identifier will be stored in a table• A unique object identifier for each concurrent
window
New Folder Object
• Consists of two objects• Folder Object
• Defines general information for the entire folder• Tab Object
• Defines each tab• One tab object for each tab
• Instantiated by *winproc • Object identifier for the folder is stored in the
variable Fldr• Object identifier for the current tab is
Fldr’CurrentTab
New Folder Object
• Folder and tab information can be modified at runtime
• Methods currently available:• Redraw( )• AddTab(Text$, PanelName$, Suppress,
FillClr1$, FillClr2$, FillPattern)• DropTab(Idx)• GotoTab(Idx)
New Folder Object
Using Properties/Methods
Redraw( ) Method• Change Folder and Tab information at runtime• Sample code to change folder font and
current tab information:
Fldr'CurrentTab'SetText("New Tab Text") Fldr'CurrentTab'SetFillPattern(3)
Fldr'CurrentTab'SetTabColour("Light Magenta")
Fldr’CurrentTab'SetAltColour("Light Green")
Fldr’SetFont("Comic Sans MS,1,&C")
Fldr’Redraw()
New Folder Object
Using Properties/Methods
AddTab( ) Method• Add a tab at runtime• Tab is added to the end of the tab list• Invokes Redraw( ) method
AddTab(Text$,PanelName$,Suppress,FillClr1$,FillClr2$,FillPattern)Where
• Text$ - tab title (fixed value or an expression preceded by an equal sign “=“)
• PanelName$ - name of the sub-panel• Suppress – 0 or 1 (optional)• FillClr1$ - First fill colour (optional)• FillClr2$ - Second fill colour (optional)• FillPattern – A value between 1 and 7 (optional)
New Folder Object
Using Properties/Methods
AddTab( ) Method
Examples:Fldr’AddTab(”NewTab”,”Newpnl”,0,”rgb:255 174 174”,”Light Cyan”,2)
Fldr’AddTab(”Another Tab”,”AnotherPnl”)
New Folder Object
Using Properties/Methods
DropTab( ) Method• Drop a tab at runtime• Remaining tabs are re-sequenced• Invokes the Redraw( ) method
DropTab(idx) • idx contains the sequential number of the tab
New Folder Object
Using Properties/Methods
GotoTab( ) Method• Activate a specific tab• Works same as setting NEXT_FOLDER
GotoTab(idx) • idx contains the sequential number of the tab
New Folder Object
Using the Object outside NOMADS
• Set NOMADS property to zero • Will only draw folder control
• Application will be responsible for handling the folder events
New Folder Object
Using the Object outside NOMADS
Sample CodePRINT 'DIALOGUE'(10,5,80,35,"Draw Folder Object",'B?'),'SR','CS',
LET Fldr=New("*obj/folder")
LET Fldr'Nomads=0
Fldr'SetColours("RGB:215 0 230;Light yellow") ! Tab colours (text and background)
Fldr'SetTabAlignment("T") ! top, bottom, left, right (T,B,L,R)
Fldr'SetFont("Verdana,1,&CS") ! S - fill text background (not whole region) with chosen colour
Fldr'SetLine(5);Fldr'SetColumn(4);Fldr'SetColumns(60);Fldr'SetLines(18)
Fldr'SetFillColours1("Light yellow/Light Green/")
Fldr'SetFillColours2("2,Light red/2,RGB:255 128 0/")
LET T$="Panel1=Tab 1"+$01$+""+$00$+"Panel2=Tab 2"+$01$+""+$00$
Fldr'SetTabInfo(T$)
Fldr'SetOrigTabCount(2)
Fldr'SetOrigTabWidth(15)
Fldr'draw()
OBTAIN (0,SIZ=1)'ME',*,'MN',; IF CTL<>4 THEN GOTO *SAME
Drop Object Fldr
End
New Folder Object
THANK YOU!
End of Presentation