At 12:53 PM 1/10/2011, Lawrence Lustig wrote:
I have a tab set control (not a Page Control) and I want
to change the list of tabs that are shown. I can see that
the control has a Tabs.Strings property, is there anyway
to access this from PROPERTY and GETPROPERTY?
Here's how:
01. Start R:BASE eXtreme 9.1 (32/64), Build: 9.1.2.10110
or higher, and then CONNECT the database.
http://www.rupdates.com
02. Open the form in Form Designer and then use one of the
following PROPERTY Syntax to dynamically change the list
of tabs that are shown, on demand, as Custom EEP for a
button, or On After Start EEP:
-- Property: MOVEUP
Syntax:
PROPERTY TabControlComponentID TABS[n]->MOVEUP Value
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
PROPERTY TSC TABS[0]->MOVEUP 1
RETURN
-- Property: MOVEDOWN
Syntax:
PROPERTY TabControlComponentID TABS[n]->MOVEDOWN Value
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
PROPERTY TSC TABS[0]->MOVEDOWN 1
RETURN
-- Property: POSITION
Syntax:
PROPERTY TabControlComponentID TABS[n]->POSITION Value
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
PROPERTY TSC TABS[0]->POSITION 3
RETURN
-- Property: DELETE
Syntax:
PROPERTY TabControlComponentID TABS[n] DELETE
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
PROPERTY TSC TABS[3] 'DELETE'
-- Property: ADD_NEW
Syntax:
PROPERTY TabControlComponentID TABS->ADD_NEW Value
Example:
CLS
DIALOG 'Enter New Tab Caption:' vTabCaption vEndKey 1 +
CAPTION 'New Tab Caption' ICON INFO +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR GREEN +
|MESSAGE_FONT_SIZE 11 +
|BUTTON_OK_WIDTH 240 +
|BUTTON_OK_CAPTION Continue as Suggested +
|BUTTON_CANCEL_WIDTH 240 +
|BUTTON_CANCEL_CAPTION Cancel and Start All Over +
|BUTTONS_SHOW_GLYPH ON +
|THEMENAME Vista CG
IF vEndKey <> '[ESC]' THEN
PROPERTY TSC TABS->ADD_NEW .vTabCaption
CLEAR VAR vTabCaption, vEndKey
ENDIF
RETURN
-- Property: CLEAR
Syntax:
PROPERTY TabControlComponentID TABS->CLEAR 'TRUE'
Example:
PROPERTY TSC TABS->CLEAR 'TRUE'
RETURN
-- Property: CAPTION
Syntax:
PROPERTY TabControlComponentID TABS[n]->CAPTION Value
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
PROPERTY TSC TABS[0]->CAPTION 'Wow!!!!!!!!'
RETURN
03. Use the following Syntax for GETPROPERTY command:
-- GetProperty: CAPTION
Syntax:
GETPROPERTY TabControlComponentID TABS[n]->CAPTION VarName
Where:
TabControlComponentID - Component ID of the TAB Control
n - index of the Tab (based on zero-index, i.e 0 - first tab)
Example:
GETPROPERTY TSC TABS[0]->CAPTION vCaption
PAUSE 2 USING .vCaption
CLEAR VAR vCaption
RETURN
-- GetProperty: COUNT
Syntax:
GETPROPERTY TabControlComponentID TABS->COUNT VarName
Where:
TabControlComponentID - Component ID of the TAB Control
Example:
GETPROPERTY TSC TABS->COUNT vCount
PAUSE 2 USING .vCount CAPTION 'GetProperty - Caption' +
ICON INFO +
BUTTON 'Press any key to continue ...' +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR GREEN +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Vista CG
CLEAR VAR vCount
RETURN
That's all there is to it!
For complete details and more examples, refer to R:Docs 9.1
http://www.rbase.com/products/rdocs
http://www.rupdates.com
For a FREE Online PROPERTY/GETPROPERTY Syntax Builder:
http://www.rbase.com/property/
http://www.rbase.com/getproperty/
Enjoy the amazing tools, support, and solutions of R:BASE!
Very Best R;egards,
Razzak.