# OOP Interface: Folder Objects

> Source: https://manual.pvxplus.com/nomads-graphical-application/appendix/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](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/folder-objects#fldr_props)** and **[Folder Methods](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/folder-objects#fldr_methods)** are listed below.

## Folder Properties

Below is a list of Folder properties.

| **Folder Properties** | **Description** |
| --- | --- |
| **BackColours$**( )  <br>**BackColors$**( ) | ***(Read Only)***<br>Background colours for each tab (each colour separated by /). See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **CtlIncrement** | ***(Internal Use Only)***<br>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)***<br>Designer mode.  <br>  <br> **0** - No  <br> **1** - Yes  <br>  <br>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)***<br>Contains the number of tabs that will display on the panel. This value is assigned to the **TabCount** property. |
| **FirstTab$** | ***(Read Only)***<br>Contains the panel *name* + *title* for the first tab (used with the scroll buttons option). |
| **FlatFolder** | Controls whether folders and tabs will have a flat appearance (no 3D look).<br>**0** - Folder and tabs do not appear flat  <br> **1** - Folder and tabs appear flat<br>*(The FlatFolder property was added in PxPlus 2026 Update 1.)* |
| **LastTab$** | ***(Read Only)***<br>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)***<br>Post-Load logic indicators for tabs.  <br>  <br> **0** - Always execute Post-Load logic ***(Default)***  <br> **1** - Execute Post-Load logic one time only |
| **OneTimePreLogic$** | ***(Internal Use Only)***<br>Pre-Load logic indicators for tabs.  <br>  <br> **0** - Always execute Pre-Load logic ***(Default)***  <br> **1** - Execute Pre-Load logic one time only |
| **OrigColumn** | ***(Read Only)***<br>Contains the original starting column for the folder region. |
| **OrigColumns** | ***(Read Only)***<br>Contains the original overall width of the folder in terms of columns. |
| **OrigLine** | ***(Read Only)***<br>Contains the original starting line number for the folder region. |
| **OrigLines** | ***(Read Only)***<br>Contains the original overall height of the folder in terms of lines. |
| **PreserveControls** | ***(Internal Use Only)***<br>Property indicating whether controls will be redrawn or not when moving between tabs.  <br>  <br> **0** - Destroy and redraw controls ***(Default)***  <br> **1** - Rename and hide/show controls |
| **ScrollCol** | ***(Read Only)***<br>Contains starting column for scroll region. |
| **ScrollHeight** | ***(Read Only)***<br>Contains the height of scroll region. |
| **ScrollLn** | ***(Read Only)***<br>Contains starting line of scroll region. |
| **ScrollWidth** | ***(Read Only)***<br>Contains the width of the scroll region. |
| **TabCol** | ***(Read Only)***<br>Contains the column position of the flat/transparent button assigned to the tab. |
| **TabCount** | ***(Read Only)***<br>Contains number of tabs in the folder. |
| **TabLine** | ***(Read Only)***<br>Contains the line position of the flat/transparent button assigned to the tab. |
| **TabTable$** | Contains the tab table definition for the current tab. |
| **TextColours$**( )  <br>**TextColors$**( ) | ***(Read Only)***<br>Text colours for each tab (each colour is separated by a **/** *slash*). See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **TruWidth** | ***(Read Only)***<br>Contains the true computed width of the tab. |
| **WindowIndex** | ***(Read Only)***<br>Window index (values can be 0, 1, 2, 3 or 4).  <br>  <br>***Where:***  <br>  <br>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).  <br>  <br>*Text$* - Text for the tab. Fixed value or expression (**"="** *equals sign* must precede expression).  <br>  <br>*PanelName$* - Name of sub-panel.  <br>  <br>*Suppress* - 1 to suppress tab, 0 if not. ***(Optional)***  <br>  <br>*FillClr1$* - First fill colour for the tab. ***(Optional)***  <br>  <br>*FillClr2$* - Second fill colour for the tab. ***(Optional)***  <br>  <br>*FillPattern* - Possible values are:  <br>  <br> **1** - Solid fill ***(Default)***  <br> **2** - Top to bottom  <br> **3** - Left to right  <br> **4** - Crossed line  <br> **5** - Top-left to bottom-right  <br> **6** - Bottom-left to top-right  <br> **7** - Diagonal crossed lines |
| **ClearTabs**( ) | ***(Internal Use Only)***<br>This method drops all tab objects. |
| **DisableActiveTab**( ) | Used to disable all the controls on the current active tab and the folder tab button.<br>Note:  <br>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.  <br>  <br>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.<br>Note:  <br>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.  <br>  <br>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.)   <br>  <br>*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)***<br>Method that draws a tab (invoked through the **ProcessTabs(** **)** method).   <br>  <br>*Tab* - Contains the object identifier. |
| **DropTab**(*idx*) | Drops a tab from the folder and invokes the **ReDraw(** **)** method.  <br>  <br>*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.<br>Note:  <br>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.  <br>  <br>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.<br>Note:  <br>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.  <br>  <br>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).  <br>  <br>*idx* - Contains the sequential number of the tab. |
| **FldrInit**( ) | ***(Internal Use Only)***<br>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)](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/folder-objects#setactivetabwid)**.<br>*(Added in PxPlus 2024)* |
| **GetBackColour$**( )   <br>**GetBackColor$**( ) | Returns default background colour for all tabs. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **GetColourNumbers$**( )  <br>**GetColorNumbers$**( ) | Returns colour numbers 0 - 15 (used with panels created in an older NOMADS version). |
| **GetColours$**( )  <br>**GetColors$**( ) | Returns background/foreground colours. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#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$**( )  <br>**GetDisabledColor$**( ) | Returns the default colour applied to a disabled tab. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **GetFillColours1$**( )  <br>**GetFillColors1$**( ) | Returns the first fill colours assigned to each tab (each colour is separated by a **/** *slash*). See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **GetFillColours2$**( )  <br>**GetFillColors2$**( ) | Returns the secondary fill colours assigned to each tab (each colour is separated by a **/** *slash*). See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#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.  <br>  <br> **0** - None   <br> **2** - Raised   <br> **3** - Recessed   <br> **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.  <br>  <br> **0** - Hide scroll buttons  <br> **1** - Show scroll buttons |
| **GetTab**(*idx*) | Returns the object identifier for the specified tab index.  <br>  <br>*idx* - Contains the sequential number of the tab. |
| **GetTabAlignment$**( ) | Returns the tab alignment setting (placement of tabs).  <br>  <br> **T** - Top ***(Default)***  <br> **B** - Bottom  <br> **L** - Left  <br> **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$**( )  <br>**GetTextColor$**( ) | Returns the default text colour assigned to all tabs. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#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.   <br>  <br>*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.   <br>  <br>*idx* - Contains the sequential number of the tab.  <br>  <br>*Text$* - Text for the tab. Can be a fixed value or an expression. An "=" *(equals sign)* must precede the expression.  <br>  <br>*PanelName$* - Name of sub-panel.  <br>  <br>*Suppress* - Set to 1 if this tab should be suppressed or 0 if not.  <br>  <br>*FillClr1$* - First fill colour for the tab. ***(Optional)***  <br>  <br>*FillClr2$* - Second fill colour for the tab. ***(Optional)***  <br>  <br>*FillPattern* - Possible values are:  <br>  <br> **1** - Solid fill ***(Default)***  <br> **2** - Top to bottom  <br> **3** - Left to right  <br> **4** - Crossed line  <br> **5** - Top-left to bottom-right  <br> **6** - Bottom-left to top-right  <br> **7** - Diagonal crossed lines |
| **NewTab**(*Tab*) | ***(Internal Use Only)***<br>Add a tab to the folder. Used by folder.pvc.  <br>  <br>*Tab -* Contains the object identifier. |
| **ProcessTabs**( ) | ***(Internal Use Only)***<br>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.  <br>  <br>***Example:***  <br>  <br>To change the font at run time:  <br>  <br> SetFont("Comic Sans MS,1,&CS")  <br> Redraw( ) |
| **RemoveTab**(*idx*) | ***(Internal Use Only)***<br>Get object identifier for the current tab index and drop the corresponding tab object.  <br>  <br>*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( )](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/folder-objects#getactivetabwid)**.<br>*(Added in PxPlus 2024)* |
| **SetBackColour**(*Bclr$*)  <br>**SetBackColor**(*Bclr$*) | Sets default background colour for all tabs. Returns 1 if successful, 0 if unsuccessful.   <br>  <br>*Bclr$ -* String containing one of four possible colour selections. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **SetColourNumbers**(*Cnums$*)  <br>**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$*)  <br>**SetColors**(*Clrs$*) | Sets up the background/foreground colour properties). Returns 1 if successful, 0 if unsuccessful.  <br>  <br>*Clrs$* - String containing background/foreground colours separated by a **;** *(semi-colon)*.<br>Note:  <br>If both colours are numeric values between (0 - 15), no semi-colon is necessary. Format mask: 0000. See [Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#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.  <br>  <br>*C* - Ctl ID generated by \*winproc (10000+ *sequential number of the tab*). |
| **SetDisabledColour**(*Dclr$*)  <br>**SetDisabledColor**(*Dclr$*) | Sets the default colour that will be applied to the title on a disabled tab.   <br>  <br>*Dclr$* - String containing a valid tab colour. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **SetFillColours1**(*F1$*)  <br>**SetFillColors1**(*F1$*) | Sets the first fill colours for each tab (each colour is separated by a **/** *slash*). Returns 1 if successful, 0 if unsuccessful.  <br>  <br>*F1$* - String containing a valid tab colour followed by a **/** *slash*. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **SetFillColours2**(*F2$*)  <br>**SetFillColors2**(*F2$*) | Sets the secondary fill colours for each tab (each colour is separated by a **/** *slash*). Returns 1 if successful, 0 if unsuccessful.  <br>  <br>*F2$* - String containing a valid tab colour followed by a **/** *slash*. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **SetFont**(*F$*) | Sets the font to be used when drawing text on the tabs. Returns 1 if successful, 0 if unsuccessful.  <br>  <br>*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.  <br>  <br>*FT$* - Possible values are:  <br>  <br> **0** = None  <br> **2** = Raised  <br> **3** = Recessed  <br> **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)***<br>Sets the resize indicator (0 or 1). Returns 1 if successful, 0 if unsuccessful. |
| **SetScrolling**(*S*) | ***(Internal Use Only)***<br>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.  <br>  <br> **0** - Hide scroll buttons  <br> **1** - Show scroll buttons |
| **SetTabAlignment**(*Align$*) | Sets the tab alignment (placement of tabs).<br>**T** - Top  <br> **L** - Left  <br> **B** - Bottom  <br> **R** - Right |
| **SetTabHeight**(*Theight*) | Sets the height in lines of a tab (or width in columns if tabs are on the right/left).  <br>  <br>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.  <br>  <br>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.  <br>  <br>*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$*)  <br>**SetTextColor**(*TC$*) | Sets the default text colour for all tabs.  <br>  <br>*TC$ -* String containing one of four possible colour selections. See **[Valid Colour Assignments](https://manual.pvxplus.com/nomads-graphical-application/appendix/oop-interface/tab#assignments)**. |
| **ShufflePanels**(*GetNextTab*) | ***(Internal Use Only)***<br>Method to change the order of the tabs (invoked when next/prior scroll buttons are pressed).  <br>  <br>*GetNextTab* - Will contain a value of 1 if the next button is pressed or a value of 0 if the prior button is pressed. |
