OOP Interface 

Folder Objects

 

The purpose of the Folder object (*obj/folder.pvc) is to define information pertaining to a folder. A Tab object (*obj/tab.pvc) is created for each tab within a Folder. The Folder Properties and Folder Methods are listed below.

Folder Properties

Below is a list of Folder properties.

Folder Properties

Description

BackColours$( )
BackColors$( )

(Read Only)

Background colours for each tab (each colour separated by /). See Valid Colour Assignments.

CtlIncrement

(Internal Use Only)

Value assigned to each control drawn. Default is 0 for main window. Incremented by 200 for each concurrent window.

CurrentTab

Reference to the currently active tab object.

DefaultProg$

Default program for tab.

Designer

(Internal Use Only)

Designer mode.

  0 - No
  1 - Yes

When editing a folder definition in NOMADS, this property will be set to 1. At run time, this property is set to 0 by *winproc.

DispTabCount

(Read Only)

Contains the number of tabs that will display on the panel. This value is assigned to the TabCount property.

FirstTab$

(Read Only)

Contains the panel name + title for the first tab (used with the scroll buttons option).

LastTab$

(Read Only)

Contains the panel name + title of the last tab (used with the scroll buttons option).

Nomads

Set to 0 if the folder object will be used outside NOMADS; otherwise, the default is 1.

OneTimePostLogic$

(Internal Use Only)

Post-Load logic indicators for tabs.

  0 - Always execute Post-Load logic (Default)
  1 - Execute Post-Load logic one time only

OneTimePreLogic$

(Internal Use Only)

Pre-Load logic indicators for tabs.

  0 - Always execute Pre-Load logic (Default)
  1 - Execute Pre-Load logic one time only

OrigColumn

(Read Only)

Contains the original starting column for the folder region.

OrigColumns

(Read Only)

Contains the original overall width of the folder in terms of columns.

OrigLine

(Read Only)

Contains the original starting line number for the folder region.

OrigLines

(Read Only)

Contains the original overall height of the folder in terms of lines.

PreserveControls

(Internal Use Only)

Property indicating whether controls will be redrawn or not when moving between tabs.

  0 - Destroy and redraw controls (Default)
  1 - Rename and hide/show controls

ScrollCol

(Read Only)

Contains starting column for scroll region.

ScrollHeight

(Read Only)

Contains the height of scroll region.

ScrollLn

(Read Only)

Contains starting line of scroll region.

ScrollWidth

(Read Only)

Contains the width of the scroll region.

TabCol

(Read Only)

Contains the column position of the flat/transparent button assigned to the tab.

TabCount

(Read Only)

Contains number of tabs in the folder.

TabLine

(Read Only)

Contains the line position of the flat/transparent button assigned to the tab.

TabTable$

Contains the tab table definition for the current tab.

TextColours$( )
TextColors$
( )

(Read Only)

Text colours for each tab (each colour is separated by a / slash). See Valid Colour Assignments.

TruWidth

(Read Only)

Contains the true computed width of the tab.

WindowIndex

(Read Only)

Window index (values can be 0, 1, 2, 3 or 4).

Where:

Window index is incremented for each concurrent window drawn. Default is 0.

Folder Methods

Below is a list of Folder methods.

Folder Methods

Description

AddTab(Text$,PanelName$,Suppress,FillClr1$,FillClr2$,FillPattern)

Add tab at run time (to the end of the current tab list).

Text$
- Text for the tab. Fixed value or expression ("=" equals sign must precede expression).

PanelName$ - Name of sub-panel.

Suppress - 1 to suppress tab, 0 if not. (Optional)

FillClr1$ - First fill colour for the tab. (Optional)

FillClr2$ - Second fill colour for the tab. (Optional)

FillPattern - Possible values are:

   1 - Solid fill (Default)
   2 - Top to bottom
   3 - Left to right
   4 - Crossed line
   5 - Top-left to bottom-right
   6 - Bottom-left to top-right
   7 - Diagonal crossed lines

ClearTabs( )

(Internal Use Only)

This method drops all tab objects.

DisableActiveTab( )

Used to disable all the controls on the current active tab and the folder tab button.

Note:
Only the controls on the current active tab will be affected since the controls on the other tabs are not drawn until that tab is active.

These methods can also be used for tab-less folders. Only the controls in the folder region will be enabled or disabled as there are no tab buttons on a tab-less folder.

DisableFldr( )

Used to disable all the controls on the active tab and all the folder tab buttons.

Note:
Only the controls on the current active tab will be affected since the controls on the other tabs are not drawn until that tab is active.

These methods can also be used for tab-less folders. Only the controls in the folder region will be enabled or disabled as there are no tab buttons on a tab-less folder.

DisableTab(idx)

Disable tab. (The colour setting in the 'GetDisabledColour$( ) method will be applied to the tab title.)

idx - Contains the sequential number of the tab.

Draw( )

This method causes the complete folder to be drawn. It is called to draw the initial folder once the tabs have been defined and is automatically invoked by the Redraw( ) method after any change to the tab or folder information (such as a screen resize or dropping/adding a tab).

DrawTab(Tab)

(Internal Use Only)

Method that draws a tab (invoked through the ProcessTabs( ) method).

Tab - Contains the object identifier.

DropTab(idx)

Drops a tab from the folder and invokes the ReDraw( ) method.

idx - Contains the sequential number of the tab.

EnableActiveTab( )

Used to enable all the controls on the current active tab and the folder tab button.

Note:
Only the controls on the current active tab will be affected since the controls on the other tabs are not drawn until that tab is active.

These methods can also be used for tab-less folders. Only the controls in the folder region will be enabled or disabled as there are no tab buttons on a tab-less folder.

EnableFldr( )

Used to enable all the controls on the active tab and all the folder tab buttons.

Note:
Only the controls on the current active tab will be affected since the controls on the other tabs are not drawn until that tab is active.

These methods can also be used for tab-less folders. Only the controls in the folder region will be enabled or disabled as there are no tab buttons on a tab-less folder.

EnableTab(idx)

Enable tab (the original tab title colour is applied).

idx - Contains the sequential number of the tab.

FldrInit( )

(Internal Use Only)

Invokes folder initialization method. Parses and builds tab information, calculates tab count, tab width, tab height, folder coordinates (col, ln, width and height) and so on. This is invoked via the Draw( ) method.

GetActiveTabWidth( )

Returns the tab width of the active tab. See SetActiveTabWidth(AW).

(Added in PxPlus 2024)

GetBackColour$( )
GetBackColor$( )

Returns default background colour for all tabs. See Valid Colour Assignments.

GetColourNumbers$( )
GetColorNumbers$( )

Returns colour numbers 0 - 15 (used with panels created in an older NOMADS version).

GetColours$( )
GetColors$( )

Returns background/foreground colours. See Valid Colour Assignments.

GetColumn( )

Returns starting column of folder region.

GetColumns( )

Returns the overall width of the folder in terms of columns.

GetCtlid( )

Returns the Ctl ID assigned to the folder (a value within the 10001 - 10999 range).

GetDisabledColour$( )
GetDisabledColor$( )

Returns the default colour applied to a disabled tab. See Valid Colour Assignments.

GetFillColours1$( )
GetFillColors1$( )

Returns the first fill colours assigned to each tab (each colour is separated by a / slash). See Valid Colour Assignments.

GetFillColours2$( )
GetFillColors2$( )

Returns the secondary fill colours assigned to each tab (each colour is separated by a / slash). See Valid Colour Assignments.

GetFont$( )

Returns a comma-separated string denoting the default font name, its point size and attributes (such as C for Centered, B for Bold, I for Italics).

GetFrameType$( )

Returns a numeric value of the frame type that is used for a tab-less folder.

  0 - None
  2 - Raised
  3 - Recessed
  4 - 3D (Default)

GetIdLst(Idlst)

Returns sequential number of the folder control on the panel. This number represents the control placement on the panel.

GetLine( )

Returns the starting line number of the folder region.

GetLines( )

Returns the overall height of the folder in terms of lines.

GetPanelIndex( )

Returns index for the current panel. Only executes if the folder has scroll buttons, the panel is resized, and the original tab count is greater than the displayed tab count.

GetPanelNames$( )

Returns a $01$ delimited string of the names of the panels for each tab.

GetOrigTabCount( )

Returns the original number of tabs (if the scroll button option is on then this number will be greater than the numbers of tabs displayed).

GetOrigTabWidth( )

Returns the original tab width assigned in the folder definition.

GetResize( )

Returns either a 0 or 1 indicating whether the folder is resized.

GetScrolling( )

Returns either a 0 or 1 indicating whether the folder is being scrolled.

GetShowArrows( )

Returns a 0 or 1 indicating the scroll button setting.

  0 - Hide scroll buttons
  1 - Show scroll buttons

GetTab(idx)

Returns the object identifier for the specified tab index.

idx - Contains the sequential number of the tab.

GetTabAlignment$( )

Returns the tab alignment setting (placement of tabs).

  T - Top (Default)
  B - Bottom
  L - Left
  R - Right

GetTabHeight( )

Returns the height of the tabs (or width if the tabs are horizontal). If 0, then no tabs are drawn (tab-less folder). System will default to 1.5 lines high, which is the current NOMADS size.

GetTabInfo$( )

Returns a $00$-separated string containing tab information. Each tab definition consists of panelname +"="+ title +$01$+ suppress tab option.

GetTabless( )

Returns a 0 or 1 indicating whether tabs are drawn or not. Default is 0.

GetTextColour$( )
GetTextColor$( )

Returns the default text colour assigned to all tabs. See Valid Colour Assignments.

GotoTab(idx)

This method causes the current tab to be changed. All controls in the current tab will be deleted and the new tab highlighted and folder region initialized to proper background colours.

idx - Contains the sequential number of the tab.

InsertTab(idx,Text$,PanelName$,Suppress,FillClr1$,FillClr2$,FillPattern)

Insert tab at run time. All tabs following the inserted tab are re-sequenced.

idx - Contains the sequential number of the tab.

Text$ - Text for the tab. Can be a fixed value or an expression. An "=" (equals sign) must precede the expression.

PanelName$ - Name of sub-panel.

Suppress - Set to 1 if this tab should be suppressed or 0 if not.

FillClr1$ - First fill colour for the tab. (Optional)

FillClr2$ - Second fill colour for the tab. (Optional)

FillPattern - Possible values are:

  1 - Solid fill (Default)
  2 - Top to bottom
  3 - Left to right
  4 - Crossed line
  5 - Top-left to bottom-right
  6 - Bottom-left to top-right
  7 - Diagonal crossed lines

NewTab(Tab)

(Internal Use Only)

Add a tab to the folder. Used by folder.pvc.

Tab -
Contains the object identifier.

ProcessTabs( )

(Internal Use Only)

Method that invokes the DrawTab(tab) method.

ReDraw( )

Redraw folder. Resets scroll region and invokes Draw( ) method. This must be executed after changing any folder or tab properties.

Example:

To change the font at run time:

  SetFont("Comic Sans MS,1,&CS")
  Redraw( )

RemoveTab(idx)

(Internal Use Only)

Get object identifier for the current tab index and drop the corresponding tab object.

idx - Contains the sequential number of the tab.

SetActiveTabWidth(AW)

Sets the width of the active tab to AW. The default is to be .9 wider than an inactive tab to make it stand out. See GetActiveTabWidth( ).

(Added in PxPlus 2024)

SetBackColour(Bclr$)
SetBackColor(Bclr$)

Sets default background colour for all tabs. Returns 1 if successful, 0 if unsuccessful. 

Bclr$ - String containing one of four possible colour selections. See Valid Colour Assignments.

SetColourNumbers(Cnums$)
SetColorNumbers(Cnums$)

Sets colour numbers (used with older panels). Returns 1 if successful, 0 if unsuccessful. This must be a value between 0 - 15.

SetColours(Clrs$)
SetColors(Clrs$)

Sets up the background/foreground colour properties). Returns 1 if successful, 0 if unsuccessful.

Clrs$ - String containing background/foreground colours separated by a ;(semi-colon).

Note:
If both colours are numeric values between (0 - 15), no semi-colon is necessary. Format mask: 0000. See Valid Colour Assignments.

SetColumn(Col)

Sets starting column of the folder. Returns 1 if successful, 0 if unsuccessful.

SetColumns(Cols)

Sets the overall width of the folder in terms of columns. Returns 1 if successful, 0 if unsuccessful.

SetCtlId(C)

Sets the Ctl ID for the folder. Returns 1 if successful, 0 if unsuccessful.

C - Ctl ID generated by *winproc (10000+ sequential number of the tab).

SetDisabledColour(Dclr$)
SetDisabledColor(Dclr$)

Sets the default colour that will be applied to the title on a disabled tab.

Dclr$
- String containing a valid tab colour. See Valid Colour Assignments.

SetFillColours1(F1$)
SetFillColors1(F1$)

Sets the first fill colours for each tab (each colour is separated by a / slash). Returns 1 if successful, 0 if unsuccessful.

F1$ - String containing a valid tab colour followed by a / slash. See Valid Colour Assignments.

SetFillColours2(F2$)
SetFillColors2(F2$)

Sets the secondary fill colours for each tab (each colour is separated by a / slash). Returns 1 if successful, 0 if unsuccessful.

F2$ - String containing a valid tab colour followed by a / slash. See Valid Colour Assignments.

SetFont(F$)

Sets the font to be used when drawing text on the tabs. Returns 1 if successful, 0 if unsuccessful.

F$ - Comma-separated string containing font name, point size and attributes.

SetFrameType(FT$)

Sets the type of frame to use when drawing a tab-less folder. Returns 1 if successful, 0 if unsuccessful.

FT$ - Possible values are:

  0 = None
  2 = Raised
  3 = Recessed
  4 = 3D (Default)

SetIdLst(IdLst)

Sets the sequential number for the folder control. This number represents the control placement on the panel.

SetLine(L)

Sets the starting line number for the folder. Returns 1 if successful, 0 if unsuccessful.

SetLines(Lns)

Sets the overall height of the folder in terms of lines. Returns 1 if successful, 0 if unsuccessful.

SetOrigTabCount(OC)

Sets the original number of tabs (if the scroll button option is on then this number will be greater than the number of tabs displayed). Returns 1 if successful, 0 if unsuccessful.

SetOrigTabWidth(OW)

Sets the original tab width assigned in folder definition. Returns 1 if successful, 0 if unsuccessful.

SetPanelNames(Pnls$)

Sets the names of the sub-panels separated by a $01$. Returns 1 if successful, 0 if unsuccessful.

SetResize(R)

(Internal Use Only)

Sets the resize indicator (0 or 1). Returns 1 if successful, 0 if unsuccessful.

SetScrolling(S)

(Internal Use Only)

Sets the scrolling indicator (0 or 1). Returns 1 if successful, 0 if unsuccessful.

SetShowArrows(SA)

Sets the scroll buttons option. Returns 1 if successful, 0 if unsuccessful.

  0 - Hide scroll buttons
  1 - Show scroll buttons

SetTabAlignment(Align$)

Sets the tab alignment (placement of tabs).

  T - Top
  L - Left
  B - Bottom
  R - Right

SetTabHeight(Theight)

Sets the height in lines of a tab (or width in columns if tabs are on the right/left).

If 0, then no tabs are displayed (tab-less folder). System default is 1.5 lines high if tab alignment is top or bottom or 2.5 for left/right tabs.

Returns 1 if successful, 0 if unsuccessful.

SetTabInfo(Info$)

Sets the tabs information (panel name, title and suppress option for each tab). Returns 1 if successful, 0 if unsuccessful.

Info$ - String containing tab info for the folder. A $00$ separates each tab definition. Tab definition consists of panelname+"="+title+$01$+suppress option.

SetTabless(T)

Sets the tab-less folder option (0 or 1).

SetTextColour(TC$)
SetTextColor(TC$)

Sets the default text colour for all tabs.

TC$ - String containing one of four possible colour selections. See Valid Colour Assignments.

ShufflePanels(GetNextTab)

(Internal Use Only)

Method to change the order of the tabs (invoked when next/prior scroll buttons are pressed).

GetNextTab - Will contain a value of 1 if the next button is pressed or a value of 0 if the prior button is pressed.