Visual LANSA Feature Help

Visual LANSA Feature Help

This file contains text that responds as help when you press F2 on a Visual LANSA event or component or press the question mark icon on the Feature tab's toolbar.

The text is not intended to be read as a guide but has been provided so that it is selected, if appropriate, in response to a search of the LANSA knowledge database.

Edition Date: May 22, 2014

© LANSA

Primitive Object
Primitive Object Properties
ComponentPatternName property
ComponentClassName property
Component tag property
Component message set property
ComponentTypeName property
ComponentType property
ComponentMembers property
MessagesOfFeature property
MessagesOfComponent property
MessageSetOfFeature property
Name property
Owner property
Parent property
Primitive Object Events
CreateInstance Event
DestroyInstance Event
Keyed collection
Keyed collection Properties
Collects Property
KeepLast Property
KeyedBy Property
Style Property
Primitive Control
Primitive Control Properties
Alignment Property
BusyCancelResult Property
BusyUpdates Property
BusyUpdatesOfParent Property
CanFocus property
Caption property
Cursor property
DataClass Property
DragStyle property
DisplayPosition property
DragCursor property
Enabled property
Focus property
Height property
Handle property
Hint property
HasFocus property
Image property
ImageExpanded property
ImageOverlay property
ImageState property
Left property
ModalResult property
Modified property
Parent property
PopupMenu property
HintShowOfParent property
HintShow property
ScreenLeft property
ScreenTop property
ShowError property
ShowLines property
SelectionStart property
SelectionEnd property
ShowMessages method
ShowMessageSet method
ShowSortArrow property
TabPosition property
TabStop property
Top property
VerticalAlignment property
Visible property
VisualStyle property
VisualStyleEdit property
VisualStyleOfParent property
Width property
ReadOnly property
Text property
Value property
Primitive Control Events
Activate event
Changed event
Click event
DoubleClick event
Exit event
StartDrag Event
StartDragEvent Source
DragDrop Aggregated Source
StartDragEvent Payload
StartDragEvent Continue
StartDragEvent DragList
DragDrop event
DragDrop PosX
DragDrop PosY
DragDrop Source
DragDrop Aggregated Source
DragDrop Payload
DragOver event
DragOverEvent PosX
DragOverEvent PosY
DragOverEvent Source
DragOverEvent Payload
DragOverEvent AcceptDrop
DragOverEvent ShowDropHilight
DragOverEvent DragCursor
DragOverEvent DragState
EndDrag event
EndDragEvent Source
DragDrop Aggregated Source
EndDragEvent Payload
EndDragEvent DragResult
DragDrop Aggregated Source
Initialize Event
Form parameter
GotFocus event
LostFocus event
PrompterActivate event
PrompterDeactivate event
KeyPress Event
KeyCodes
KeyCode parameter
Char parameter
IsAltDown parameter
IsControlDown parameter
IsShiftDown parameter
Handled parameter
Primitive Control Methods
UpdateDisplay Method
SetFocus Method
Realize Method
Unrealize Method
Container component
Container component Properties
ComponentControls property
EnableChildren Property
LayoutManager Property
Push button
Push button Properties
ButtonCancel property
ButtonDefault property
ImagePosition property
Menu property
MenuPosition property
MenuSeparator property
Radio button
ButtonChecked property
Check box
ButtonState property
Toolbar button
Toolbar button Properties
ButtonStyle Property
GroupIndex Property
Check Property
AllowAllUp Property
ComponentVersion Property
Static
Static Properties
DrawType Property
FrameHeightBottom Property
FrameHeightTop Property
FrameWidthLeft Property
FrameWidthRight Property
LineType Property
LineWidth Property
Label
Label Properties
Alignment Property
FocusControl Property
Ellipses Property
WrapStyle property
Edit Box
Edit Box Methods
SelectText Method
SelectText StartPosition
SelectText Length
Edit Box Properties
DisplayAlignment property
EditAlignment property
CharacterCase property
HasSelection Property
PasswordChar property
ReadOnly property
Spin edit box
Spin edit box Properties
Increment property
Wrap property
Spin edit box Methods
Dec method
Inc method
Multi-line edit box
Multi-line edit box Properties
AddEntryMode property
ComponentVersion property
CurrentLine property
CharacterPosition property
EnableCut property
DisableNoScroll property
EnablePaste property
HasSelection Property
HorizontalScroll property
LineCount property
MarginLeft property
MaximumLineLength property
MaximumLines property
OnOutput property
OutputText property
ShowLineNumbers property
VerticalScroll property
WordWrap property
Multi-line edit box Events
Positionchanged event
LineChanged event
Multi-line edit box Methods
Cut Method
Copy Method
Paste Method
Undo Method
Redo Method
SelectAll Method
SelectMultiLineText Method
Select Multiline Text
StartLineNumber parameter
StartPosition parameter
EndLineNumber parameter
EndPosition parameter
Find Method
Replace Method
Print Method
Form
Form Properties
BorderIcons property
ClientHeight property
ComponentVersion property
ClientWidth property
NormalTop property
NormalLeft property
NormalHeight property
NormalWidth property
FormOwner property
FormPosition property
FrameStyle property
FormStyle property
Icon property
Menubar property
ScalingFactorHor property
ScalingFactorVer property
TitleBarVisible property
WindowState property
Form Events
Closing event
Action Parameter
CloseQuery event
Continue parameter
Deactivate event
Form Methods
CloseForm method
CloseFormQuery method
ActivateForm method
HideForm method
MaximizeForm method
MinimizeForm method
ShowForm method
ShowModalForm method
RestoreForm method
Panel
Panel Properties
HorizontalScrollPos property
VerticalScrollPos property
HorizontalScrollInc property
VerticalScrollInc property
Graph
Graph Properties
GraphType property
XCaption property
YCaption property
CurveStyle property
CurveOrder property
CurveGranularity property
StatisticalStyle property
AreaStyle property
BarStyle property
LineStyle property
PieStyle property
ScatterStyle property
SurfaceStyle property
ValueAt Property
Graph Methods
SetValue Method
Basic List
Basic List Properties
Appearance property
Columns property
ColumnEllipses property
ColumnHeaders property
ColumnScroll property
FullRowSelect property
Items property
CurrentItem property
Entries property
FocusItem property
Messages property
Modified property
KeyboardPositioning property
ModifiedRules property
NotificationStyle property
ShowItemHint property
ShowSelectionHilight property
ShowSelection property
SelectionStyle property
UsePicklist property
ColumnResize property
DragColumns property
EditorSizing property
PrompterTabStop property
View Pop-up Menu property
ViewStyle property
Value parameter Event
PrompterPosition property
PrompterImage property
ShowPrompter property
Basic List Events
ItemGotFocus event
ItemGotFocusAccept event
ItemChangedAccept event
Accept Parameter
Reason Parameter
Continue Parameter
Value parameter
ItemHintText event
ItemLostFocus event
ItemGotSelection event
ItemGotSelectionAccept event
ItemLostFocusAccept event
ItemLostSelection event
ItemLostSelectionAccept event
ItemChanged event
ViewDoubleClick event
Basic List Methods
StartEdit method
SizeToContents method
FindItem method
StartItem parameter
Result parameter
RelatedReference parameter
OnItemGotReference Method
OnSort Method
StartEdit method
Basic Edit
AutoSelect property
AutoTab property
HideSelection property
MaxLength property
Visual Pick list
Visual Picklist properties
Appearance property
Columns property
ComponentVersion property
Orientation property
List Box
List Box Properties
Cell property
Row Parameter
Column parameter
ComponentVersion property
List box cell
List box cell Properties
Column property
Item property
ListBox property
IntegralHeight property
List view
List view Properties
AutoArrange property
Checkboxes property
ComponentVersion property
IconAlignment property
ValueAt
ColumnHeaderPress property
List view Methods
SetValue Method
Item Hint Text Parameters
ItemHintTextEvent Caption parameter
ItemHintText Cell parameter
Grid
Grid Properties
AnchorCell property
CaptionNoBlankLines property
Cell property
Cell Row property
Cell Column property
ColumnButtons property
ColumnButtonHeight property
ColumnButtonPress property
ColumnEllipses property
ColumnResize property
ComponentVersion property
DragColumns property
EnterKeyStyle property
EscapeKeyStyle property
FocusCell property
FrozenColumns property
RowButtons property
RowButtonWidth property
RowHeight property
RowResize property
RowSizing property
SelectedColumnCount property
SelectedRowCount property
ShowButtonSelection property
ShowLines property
TabbingStyle property
SplitStyle property
ValueAt Property
Grid Events
EditorChanged event
Grid Methods
SetValue Method
StartSplit method
Grid Cell
Grid Cell Properties
Column property
Item property
Grid property
CellReadOnly property
Grid Cell Method
SetValue Method
GridItem
GridItem Properties
ValueAt Poperty
Cell property
Column parameter
GridItem Methods
SetValue Method
Combo Box
Combo Box Properties
AutoSelectItem property
Cell property
Cell parameter
Row parameter
ComboBoxStyle property
ComponentVersion property
DropDownCount property
FixedHeight property
IntegralHeight property
DropDownWidth Property
Combo Box Events
CloseUp Event
DropDown Event
Continue Event Parameter
Combo Box Methods
OpenDropDown method
CloseDropDown method
Combo Box Cell
Combo Box Cell Properties
Column property
Item property
ComboBox property
Explorer
Explorer Properties
ArrangeBy property
DisplayStyle property
DriveSpaceFree property
DriveSpaceTotal property
Path property
PathType property
IncludeMask property
FileTypeMask property
AutoRefresh property
AppendPathSeparator property
FileName property
NotifyComponent property
ApplySecurity property
RootPath property
VisiblePath property
Explorer Events
ItemDoubleClick event
PathChanged event
Explorer Method
Refresh method
Tree View
Tree View Properties
Checkboxes property
ComponentVersion property
EntriesAtRoot property
HasButtons property
HasLines property
ManageChildren property
Level property
ValueAt Property
LinesAtRoot property
MultipleSelectStyle property
Tree View Method
CollapseAll method
SetValue Method
StartLabelEdit method
Tree View Event
Expand Item Parameter
ItemExpanding Event
ItemCollapsed Event
TreeItem
TreeItem Properties
Bold property
ChildrenCount property
HasChildren property
HasLines property
ParentItem property
Level property
Expanded property
CheckEnabled property
CheckReadOnly
Checked property
Tree property
MarginBottom property
MarginTop property
Position property
ValueAt Property
TreeItem Methods
List item Collapse method
List item Expand method
SetValue Method
Column of a List-Type Component
Column of a List-Type ComponentProperties
RowAlign method
SelectOnClick property
SortAsColumn property
SortDirection property
SortOnClick property
SortPosition
Source
ReadOnly
WidthType
SortType
CaptionAlign property
CaptionType property
CaptionText
Checkboxes property
ColumnAlign property
ColumnRole property
DisplayAppearance property
DisplayPosition property
EditAppearance property
KeyPosition property
Editor property
MinimumWidth property
ValueAt Property
Column of a List-Type Component Events
GotFocus Event
GotFocusAccept event
GotSelection Event
GotSelectionAccept event
LostFocus Event
LostFocusAccept event
LostSelection Event
LostSelectionAccept event
Column of a List-Type Component Methods
SetValue Method
EditorManager component
EditorManager component Properties
EditorPart property
ShowDropDown property
ShowPrompt property
EditorManager component Methods
Prompt method
Basic List item
EnsureVisible Property
Checked Property
Checkboxes property
Entry Property
FirstVisible Property
CurrentItem Focus Property
CurrentItem Position Property
RelatedReference property
CurrentItem Selected Property
CheckEnabled property
Basic Bar
MinimumValue property
MaximumValue property
Value property
Progress bar
Trackbar
LineSize property
Orientation property
PageSize property
TickFrequency property
TickMark property
TickStyle property
Group box
Image
AutoSize property
Format property
FileName property
ImageHeight
ImageWidth
ImageAlignment property
Basic Video
FileName property
ImageHeight
ImageWidth
Video
VideoStopped event
Video panel
FrameBackward method
FrameForward method
Play method
Stop method
CycleToStart property
Sound
FileName property
Status bar
LayoutStyle property
MessagePosition property
Tab folder
Tab Folder properties
BottomAllowAutoHide property
BottomAutoHide property
BottomTabHeight property
BottomTabLocation property
BottomViewStyle property
DragTabs property
LeftAllowAutoHide property
LeftAutoHide property
LeftTabLocation property
LeftTabWidth property
LeftViewStyle property
RightAllowAutoHide property
RightAutoHide property
RightTabLocation property
RightTabWidth property
RightViewStyle property
TopAllowAutoHide property
TopAutoHide property
TopTabHeight property
TopTabLocation property
TopViewStyle property
FixedWidth property
TabLocation property
TabLayout property
TabStyle property
MultiLine property
RaggedRight property
OpenPage property
TabHeight property
TabWidth property
ViewStyle property
ShowPageTabs property
LeftShowPageTabs property
TopShowPageTabs property
BottomShowPageTabs property
RightShowPageTabs property
Tab folder Events
TabChanging event
OpenPage parameter
CanChangePage parameter
Tab sheet
Tab sheet Property
Opened property
Tab sheet Events
Opening event
Closing event
Tab sheet Method
Open method
Tab sheetToolbar
Visual style
Default Property
Visual Style Scheme
Values Property
Captions Property
Titles Property
Visual style item
AlternBackColor property
BorderColor property
LineColor property
Bold property
BorderStyle property
ErrorBackColor property
FaceName property
FontSize property
Italic property
NormBackColor property
StrikeOut property
Script property
SQLNullBackColor property
TextColor property
Underline property
Timer
Timer Properties
Interval Property
IsStarted Property
StartUp Property
Timer Events
Timer Tick Event
Timer Methods
Timer Start method
Timer Stop method
Menu item
Checked property
Default property
GroupIndex property
MenuBreak property
RadioItem property
SubMenu property
ShortCut property
Tag property
Tip property
TipShow property
TipShowOfParent property
Base menu
Base menu properties
TipShow property
Base menu event
Menu Prepare event
Menu bar
Pop-up menu
Pop-up menu Methods
Pop-up Show method
X parameter
Y parameter
Pop-up menu Events
Prepare event
Context parameter
AutoActions property
Cascading Menu Submenu
Base graphic
Bitmap
ImageCount
MaskColor
UseMaskColor
Icon
StandardIcon property
Cursor
HotspotX property
HotspotY property
StandardCursor property
Elemental Visual Part
Elemental Visual Part Properties
HintType property
MarginBottom property
MarginLeft property
MarginRight property
MarginTop property
LabelPosition property
LabelType property
LabelHorAlignment property
LabelVerAlignment property
LabelText Property
SetValue Property
Pick List
Pick list item
Pick list item caption
Default pick list item
Pick list item value
Pick list data class
Pick list Property
NoMatchAction property
Data Class Alphanumeric PRIM_ALPH
Case of the string
Length of the string
Picklist associated with the data class
Data Class Boolean PRIM_BOLN
Data Class Currency PRIM_CRCY
Data Class Date PRIM_DATE
Data Class Date-And-Time PRIM_DAT
Data Class Number PRIM_NMBR
Number of decimals
DisplayFormat sets the edit code
Length of the number
Picklist associated with the data class
Data Class Numeric String PRIM_NSTR
Data Class Time PRIM_TIME
Variant Component
Variant Properties
Boolean property
Component property
Decimal property
String property
Integer property
ValueType property
Variant Methods
AssignNull method
AssignEmpty method
Data class component
Decimals property
Length property
Com Error
COM Error Properties
ErrorCode property
ErrorWord property
HelpContext property
HelpFile property
IsError property
Com Error Methods
Clear method
ReportError method
ReportErrorAndAbort method
ShowErrorHelp method
Application component
Mouse component
Mouse Event Parameters
PosX Parameter
PosY Parameter
IsAltDown Parameter
IsControlDown Parameter
IsShiftDown Parameter
IsLeftButtonDown Parameter
IsMiddleButtonDown Parameter
IsRightButtonDown Parameter
Keyboard component
Property Sheet
Property sheet column
Property sheet item
Property sheet item Ancestor property
DefaultProperty property
Public property
Private property
Protect property
Framework property
Group property
Description property
Basic Layout
Manage property
Parent property
MarginTop property
MarginLeft property
MarginRight property
MarginBottom property
Base layout manager
MaxHeight property
MinHeight property
MaxWidth property
MinWidth property
Base layout item
Attachment Layout Manager
ProcessingOrder property
Attachment Layout Item
Attachment property
Percentage property
Split Layout Manager
Orientation property
Split Layout Manager
Split Layout Item
Sizable property
Weight property
Flow Layout Manager
Direction property
ItemsPerDivision property
FlowOperation property
FlowOperationHorizontal property
FlowOperationVertical property
MaxColumns property
MaxRows property
MinColumns property
MinRows property
SizingRuleHorizontal property
SizingRuleVertical property
Spacing property
SpacingItems property
Flow Layout Item
Grid Layout Item
Grid Layout Manager
RuleAlignment property
Top property
Left property
Width property
Height property
RuleAlignment property
RuleSizing property
WeightHorizontal property
WeightVertical property
ProgID property
TypeLibId property
Shortcut key
HotKeyPressed Event
Safe Array
Safe Array Properties
Collects Property
Dimension1Size property
Dimension2Size property
Dimension3Size property
Safe Array Item Property
MaxDimensions Property
Safe Array Methods
Add method
Entry Field
Collection
Array collection
Array collection accessor
Collection accessor
Keyed collection accessor
Array collection iterator
Collection iterator
Keyed collection iterator
Dictionary collection
Dictionary collection accessor
Dictionary collection iterator
List collection
List Collection Methods
Append method
Concatenate method
OtherList to append parameter
OtherList to concatenate parameter
Result parameter
List collection accessor
List collection iterator
Basic Collection
Basic Collection Item
Item parameter
Object parameter
Subject parameter
Result parameter
KeyOf property
Item parameter
Value parameter
Result parameter
Basic Collection Events
Hash event
Result parameter
Subject parameter
Hash parameter
Result parameter
IsEqual event
Object parameter
Subject parameter
Equal parameter
Compare event
Basic Collection Methods
CreateAccessor method
Result parameter
CreateIterator method
Result parameter
MoveNext method
Reset method
CalculateHash method
Remove method
Result parameter
Object parameter
Key parameter for deletion
RemoveAll method
RemoveAt method
Result parameter
Index parameter
RemoveFirst method
Result parameter
RemoveLast method
Result parameter
ReplaceAt method
Result parameter
Item parameter
Index parameter
ContainsItem method
Result of ContainsItem
OccurrencesOf method
Result parameter
Object parameter
Find method
Key parameter
Object parameter
Result parameter
Contains method
Result parameter
Object parameter
Key parameter
Insert method
Key parameter for insertion
Item parameter
InsertAfter method
Item parameter
Index parameter
InsertBefore method
Item parameter
Index parameter
InsertFirst method
Item parameter
InsertLast method
Item parameter
Basic Collection Property
StartingAt parameter
AtEnd property
Current property
CurrentKey property
LastIndexOf property
Object parameter
AllowsDuplicates property
First property
Last property
IndexOf property
Object parameter
StartingAt parameter
IsEmpty property
IsOrdered property
Item property
Index parameter
ItemCount property
Key parameter to identify
Object parameter
Set collection
Set collection accessor
Set collection iterator
Sorted array collection
Sorted array collection accessor
Sorted array collection iterator
Sorted dictionary collection
Sorted dictionary collection accessor
Sorted dictionary collection iterator
Component type component
Component Type Component Property
Ancestor property
IsAbstract property
IsClass property
IsInterface property
IsPrimitive property
IsVariant property
Pattern property
Properties property
Methods property
Events property
TypeName property
Event component
Event component properties
FeatureName property
IsFinal property
OuterFeature property
Parameters property
Event parameter component
Event parameter component properties
FeatureName property
IsByReference property
IsByValue property
IsInput property
IsMandatory property
IsOutput property
OuterFeature property
Method component
Method component Properties
FeatureName property
IsFinal property
IsRedefined property
OuterFeature property
Parameters property
Method parameter component
Method parameter component properties
FeatureName property
IsByReference property
IsInput property
IsMandatory property
OuterFeature property
IsResult property
IsByValue property
IsOutput property
Property component
Property component properties
FeatureName property
GetParameters property
IsGetKeyed property
IsSetKeyed property
OuterFeature property
SetParameters property
Property parameter component
Property parameter component properties
FeatureName property
IsByReference property
IsByValue property
IsInput property
IsMandatory property
IsOutput property
IsResult property
OuterFeature property
Meta pattern component
Message component
FirstLevelText property
HasSecondLevelText property
SecondLevelText property
Primitive collection
Primitive Iterator component
Variant Component
SetValue Property
DefaultPicklist property
DefaultPrompter property
DefaultVisual property
Desktop application component class
Desktop application methods
CaptureDesktop method
CaptureWindow method
CaptureWindowResult parameter
CaptureWindowFileName parameter
CaptureWindowControl parameter
Desktop application properties
VirtualScreenLeft
VirtualScreenTop
VirtualScreenWidth
VirtualScreenHeight
EnsureVisibleForms
PrimaryMonitor
Monitors
ScalingFactorHor property
ScalingFactorVer property
ScreenHeight property
ScreenWidth property
ComponentForms property
CloseAllForms method
CaptureDesktopResult parameter
CaptureDesktopFileName parameter
Disable Process Ghosting Property
WheelOnMouse property
Themes
Themed Forms
Theme 2003 Colors
Theme Operating System
Theme Style Property
Form Theme Style
Control Theme Style
Theme Draw Style Property
Component proxy component
Component Proxy Properties
ProgID property
TypeLibId property
ComponentOnFailure property
ComponentOnSuccess property
Component Proxy Event
ComponentError event
Control container component
Composite container Class
ProgID property
TypeLibId property
Draglist
Draglist properties
Listview DraglistStyle
Listview Dragimage
DateTime picker
DisplayAsUTC property
Checkbox property
Checked property
CustomDateFormat property
CustomTimeFormat property
DateFormat property
TimeFormat property
FormatText property
ShowDate property
ShowDateButton property
ShowTime property
ShowTimeButton property
Format property
MaxDate property
MinDate property
Value property
Calendar
MaxDate property
MinDate property
ShowToday property
ShowTodayCircle property
StartOfWeek property
Value property
Attribute base class
Interface proxy base class
Contextual message set component
Calendar control base class
Multi-line edit box base class
Progress bar base class
Spin edit box base class
Data class DateTime
Track bar base class
WAM base class
WAM Base Events
SessionInvalid event
SenderName parameter
WAM Base Properties
SessionKeyMethod property
SessionTimeout property
SessionStatus property
CheckNumeric Property
LayoutWeblet Property
SessionGroupName property
Weblet base class
Data class base class
DateTime library
DateTime base class
Intrinsic function library
Interface base class
Message context base class
Number function library
String function library
Variant function library
Variant function library methods
VarAsBoolean method
Result parameter
Subject parameter
VarAsDate method
Result parameter
Subject parameter
VarAsDecimal method
Result parameter
Subject parameter
VarAsInteger method
Result parameter
Subject parameter
VarAsReference method
Result parameter
Subject parameter
VarAsString method
Result parameter
Subject parameter
VarType method
VarIsBoolean method
Result parameter
Subject parameter
VarIsDate method
Result parameter
Subject parameter
VarIsEmpty method
Result parameter
Subject parameter
VarIsNull method
Result parameter
Subject parameter
VarIsNullReference method
Result parameter
Subject parameter
VarIsNumber method
Result parameter
Subject parameter
VarIsReference method
Result parameter
Subject parameter
VarIsString method
Result parameter
Subject parameter
VarType method
Result parameter
Subject parameter
Graph item base class
Visual style language base class
Common Dialogs
Color dialog
Color dialog property
ChosenColor property
FullyOpen property
PreventFullOpen property
Color dialog method
Show method
FormOwner parameter
OKPressed parameter
Save File dialog
OverwritePrompt property
Open File dialog
Open File dialog method
Show method
FormOwner parameter
OKPressed parameter
Add Filter Method
Name
Extension
ExplorerStyle property
Multiselect property
FilterIndex property
FilterCount property
FileCount property
File property
FileTitle property
InitialDir property
Title property
DefExtension property
FilterCaption property
FilterExtension property
Files property
AddFilter method
HideReadOnly property
Name property
Extension property
Calendar for field visualization
Calendar for field visualization Calendar primitive
Help handler interface
ProcessFocusControl method
ProcessHelpRequest method
Handled parameter
Requestor parameter
Tag parameter
Handled parameter
Requestor parameter
Tag property
Tabsheet
Tabsheet Properties
DockAllowedPositions property
DockAllowUndock property
DockCloseButton property
DockPosition property
Tabsheet Events
AutoHideClick event
CloseClick event
Docked event
Undocked event
Tabsheet Methods
HideSheet method
ShowSheet method
Activate parameter
Ribbon Features
Ribbon
Minimized
OpenPage
QuickAccessToolbarOnTop
Access Key
Control
Application Menu
Caption
Application Menu Content
Application Menu Footer
Contextual Group
Caption
Visible
Ribbon Group
DialogButton Click Event
DialogButton Property
Help Toolbar
Image Property
Quick Access Toolbar
Ribbon Sheet
KeyTip
Contextual Group
Glass Controls
Glass Property
Form Glass
Glass Style Property
MarginBottom Property
MarginLeft Property
MarginRight Property
MarginTop Property
ShowInTaskBar Property
TaskBar Property
TaskBar
Hint Property
OverlayImage Property
ProgressStyle Property
Progress Value
Animation
Ended
Starting
Start
Stop
IsAnimating
Animation Item
Duration
StartTime
Height Animation
Height
Manage
Move Animation
Left
Top
MoveFrom Animation
Left
Top
MoveTo Animation
Left
Top
Opacity Animation
Opacity
Rotate Animation
Angle
OriginLeft
OriginTop
Scale Animation
Origin Left
Origin Top
ScaleHeight Left
ScaleWidth Left
Skew Animation
Angle Left
Angle Top
Origin Left
Origin Top
Visibility Animation
Visible
Width Animation
Width
Transition Animation
From
To
TransitionType
Control and Composite
Origin
Handled
FadeIn Method
Delay
Duration
FadeOut Method
Delay
Duration
Scale Method
ScaleWidth
ScaleHeight
Delay
Duration
MouseEnter Event
MouseHover Event
MouseLeave Event
Hint Popup Property
Hint Title Property
IsAnimating Property
MouseOver Property
MouseOverStyle Property
MouseOverStyles Property
Opacity Property
Popup Property
Rotation Property
RotationOriginLeft Property
RotationOriginTop Property
ScaleHeight Property
ScaleWidth Property
ScaleOriginLeft Property
ScaleOriginTop Property
SkewLeft Property
SkewTop Property
SkewOriginLeft Property
SkewOriginTop Property
Style Property
Styles Property
Styles Collection
Style
Add Method
Remove Method
RemoveAll Method
MouseOverPart Property
PrivateStyle Property
PrivateStyles Property
Transition Method
To
From
TransitionType
Delay
Duration
RenderStyle
Style (Prim_Vs.Style)
BackgroundBrush Property
BorderBottom Property
BorderBrush Property
BorderLeft Property
BorderRight Property
BorderTop Property
CornerBottomLeft Property
CornerBottomRight Property
CornerTopLeft Property
CornerTopRight Property
Effect Property
ForegroundBrush Property
MaskBrush
Brush
BrushColors
BrushColor
At Property
Color Property
Parent Property
Gradient Brush
Colors Property
Opacity Property
Spread Property
Linear Brush
EndLeft Property
EndTop Property
StartLeft Property
StartTop Property
Radial Brush
CenterLeft Property
CenterTop Property
OriginLeft Property
OriginTop Property
RadiusLeft Property
RadiusTop Property
Solid Brush
Color Property
Opacity Property
Image Brush
Alignment Property
Height Property
Image Property
Left Property
Opacity Property
Sizing Property
Tile Property
Top Property
Units Property
Width Property
Visual Brush
Control Property
Effect
Blur Effect
KernelType Property
Radius Property
DropShadow Effect
BlurRadius Property
Color Property
Direction Property
Opacity Property
ShadowDepth Property
User Designed Controls
Tile (Prim_Tile)
Items Property
SelectionStyle Property
Tile Event Item
Add Method
Result Parameter
DesignType Parameter
DeleteAll Method
FindItem Method
Result Parameter
Key Parameter
Item Parameter
iTileDesign Interface
OnAdd Method
Tile Item
OnDelete Method
Tile Item
OnDisplaying Method
Tile Item
OnFind Method
Result Parameter
Key Parameter
TileItem Parameter
OnItemGotFocus Method
TileItem Parameter
OnItemLostFocus Method
TileItem Parameter
OnItemGotSelection Method
TileItem Parameter
OnItemLostSelection Method
TileItem Parameter
OnUpdate Method
Tile Item
Tile Property
Tile Item (Prim_Tile.TileItem)
Design Property
Tile Property
Carousel (Prim_Caro)
CarouselStyle Property
Items Property
NavigationStyle Property
Carousel Event Item
Add Method
Result Parameter
DesignType Parameter
DeleteAll Method
FindItem Method
Result Parameter
Key Parameter
Item Parameter
FirstItem Method
Animate Parameter
LastItem Method
Animate Parameter
MoveToItem Method
Position Parameter
Animate Parameter
NextItem Method
Animate Parameter
PrevItem Method
Animate Parameter
iCarouselDesign Interface
CarouselItem Parameter
CarouselItem Parameter
CarouselItem Parameter
Result Parameter
Key Parameter
CarouselItem Parameter
CarouselItem Parameter
CarouselItem Parameter
CarouselItem Parameter
Carousel Items (Prim_Carousel.iCarouselItems)
Carousel Property
Carousel Item (Prim_Carousel.iCarouselItem)
Book (Prim_Book)
Items Property
NavigationStyle Property
Book Event Item
Add Method
Result Parameter
DesignType Parameter
DeleteAll Method
FindItem Method
Result Parameter
Key Parameter
Item Parameter
FirstItem Method
Animate Parameter
LastItem Method
Animate Parameter
MoveToItem Method
Position Parameter
Animate Parameter
NextItem Method
Animate Parameter
PrevItem Method
Animate Parameter
iBookDesign Interface
BooklItem Parameter
BookItem Parameter
BookItem Parameter
Result Parameter
Key Parameter
BookItem Parameter
BookItem Parameter
BookItem Parameter
BookItem Parameter
Book Property
Book Item (Prim_Book.BookItem)
Tree (Prim_Tree)
Items Property
Selection Style Property
Tree Event Item
ItemCollapsed Event
ItemExpanding Event
ItemGotParent Event
Add Method
Result Parameter
DesignType Parameter
DeleteAll Method
FindItem Method
Result Parameter
Key Parameter
Item Parameter
iTreeDesign Interface
Tree Item Parameter
Tree Item Parameter
Tree Item Parameter
Result Parameter
Key Parameter
TreeItem Parameter
OnItemCollapsed Method
TreeItem Parameter
OnItemExpanding Method
TreeItem Parameter
OnItemGotParent Method
TreeItem Parameter
TreeItem Parameter
TreeItem Parameter
TreeItem Parameter
Tree Property
Tree Item (Prim_Tree.TreeItem)
Design Property
Expanded Property
FocusedStyle Property
FocusedStyles Property
MarginBottom Property
MarginLeft Property
MarginRight Property
MarginTop Property
MouseOverStyle Property
MouseOverStyles Property
ParentItem Property
SelectedStyle Property
SelectedStyles Property
Style Property
Styles Property
Tree Property
System Application Controls
Focus Control Changed Event
Control Parameter
Appearance Property
Calendar Property
CheckBox Property
ComboBox Property
DateTime Property
Edit Property
Grid Property
GridFocused Property
GridFocusedInactive Property
GridSelectedInactive Property
GridMouseOver Property
GridSelected Property
GroupBox Property
Image Property
Label Property
List Box Property
ListBoxFocused Property
ListboxFocusedInactive Property
ListboxSelectedInactive Property
ListboxSelectedInactive Property
ListBoxMouseOver Property
ListBoxSelected Property
List View Property
ListViewFocused Property
ListviewFocusedInactive Property
ListboxSelectedInactive Property
ListViewMouseOver Property
ListViewSelected Property
Memo Property
Panel Property
Popup Property
ProgressBar Property
PushButton Property
RadioButton Property
RadioButton Property
SpeedButton Property
SpinEdit Property
Tab Property
TrackBar Property
Tree Property
TreeFocused Property
TreeviewFocusedInactive Property
TreeboxSelectedInactive Property
TreeMouseOver Property
TreeSelected Property
Cursors Property
FocusControl Property
GlassEnabled Property
HelpHandlerProperty
Images Property
Operating System Property
PartitionShortCharLength Property
PartitionShortCharLevel Property
RenderStyle Property
Style Property
Styles Property
TraceHandlerProperty
Ribbon Controls
Ribbon
Minimized
OpenPage
QuickAccessToolbarOnTop
Access Key
Control
Application Menu
Caption
Application Menu Content
Application Menu Footer
Contextual Group
Caption
Visible
Ribbon Group
DialogButton Click Event
DialogButton Property
Help Toolbar
Image Property
Quick Access Toolbar
Ribbon Sheet
KeyTip
Contextual Group
Touch
Touch Properties
Touch Scroll Property
Touch Move Property
Touch Rotate Property
Touch Scale Property
Touch Events
Touch Start Event
Touch End Event
Touch Change Event
Touch Parameters
MoveLeft Parameter
MoveTop Parameter
ScaleHeight Parameter
ScaleWidth Parameter
Rotation Parameter
Continue Parameter


Primitive Object

Base object, use it as the ancestor of components which are not visualized

Root of LANSA Component class hierarchy.

Primitive Object Properties

Primitive Object Events


Primitive Object Properties

ComponentPatternName property

ComponentClassName property

Component tag property

Component message set property

ComponentTypeName property

ComponentType property

ComponentMembers property

MessagesOfFeature property

MessagesOfComponent property

MessageSetOfFeature property

Name property

Owner property

Parent property


ComponentPatternName property

ComponentPatternName is used to qualify the class of the component.


ComponentClassName property

ComponentClassName is the name of the component's class.


Component tag property

For LANSA Product Centre's internal use only.


Component message set property

For LANSA Product Centre's internal use only.


ComponentTypeName property

ComponentTypeName is the fully qualified name of the component's class.


ComponentType property

Use the ComponentType property to get access to the type information about the component.

This property enables a facility referred to as Reflection in JAVA.

You only use this property if you are writing a tool that accesses classes of Visual LANSA components and checks them for certain qualities and features.


ComponentMembers property

ComponentMembers provides access to all the member components of this component

The ComponentMembers property gives you access to a collection of all the components that are members of the current owner component.

Using ComponentMembers you can examine the contents of your owner component and do generic programming on all members.

This example records all the member components on a form and lists them in a grid:

For Each(#Current) In(#Com_Owner.ComponentMembers)
Change Field(#STD_NAME) To('#CURRENT.NAME')
Add_Entry To_List(#GRID_1)
Endfor

Note that the ComponentMembers property can only be used with components which are owners (see Owner property) of other components. For example lists are not owners of the columns they contain (to access the properties of the columns use the Columns property of the list).


MessagesOfFeature property

For LANSA Product Centre's internal use only.


MessagesOfComponent property

For LANSA Product Centre's internal use only.


MessageSetOfFeature property

For LANSA Product Centre's internal use only.


Name property

The Name property identifies the component. The name is specified when the component is created. It can be up to 20 characters long.

When you use components in another component (for example push buttons in a form), LANSA gives every instance of the component a default name such as PHBN_1, PHBN_2. You can change these names to more meaningful ones. For example, if the button performs a fetch operation, you could call it 'Fetch'.

The name of a component is never visible at run time. Use the Caption and Label properties for descriptions users can see.

In the case of a current item in, for example, a list, the name is the text contained in the item which is current.


Owner property

Owner owns this component

The Owner property indicates the component which owns this component.

When you are creating multi-form applications, you need to use the run-time FormOwner property to specify the owner form of the member forms. For more information refer to the FormOwner property.


Parent property

The Parent property indicates which component contains another component. The currently selected component does not have a parent and therefore its Parent property is set to the value of the Owner.


Primitive Object Events

CreateInstance Event

DestroyInstance Event


CreateInstance Event

CreateInstance is signalled when an instance of a component is created

The CreateInstance event is signalled immediately after an instance of a component is created. This is the first event to be triggered when, for example, a form or a reusable part is about to be shown.

The CreateInstance event precedes the Initialize event which is triggered when the component is shown. Therefore code that needs to be processed before the component is shown should be put in the CreateInstance event. For example it is best to put routines that set the size and other characteristics of the form in the CreateInstance event because in the Initialize event they will cause a jump effect.

For non-visual components all initialization code must be put in the CreateInstance event because non-visual components do not signal the Initialize event.


DestroyInstance Event

DestroyInstance is signalled when an instance of a component is about to be destroyed

The DestroyInstance event is signalled immediately prior to destroying an instance of a component.


Keyed collection

A set of component instances

Keyed collections are an unordered sequence of components identified by a key value. No duplicates of the key value are allowed.

A keyed collection is keyed by a field, in other words every item in a collection is identified by a unique value of a field.

Let's use a form which displays employee details as an example. We want our application to be able to show this form for several individual employees simultaneously. The individual instances of the form are identified by the employee number of the employee.

This is how the collection of forms is defined:

DEFINE_COM CLASS(#PRIM_KCOL) NAME(#DFORMS) COLLECTS(#FRMDETAIL) KEYEDBY(#EMPNO)

or

DEFINE_COM CLASS(#PRIM_KCOL<#FRMDETAIL #EMPNO>) NAME(#DFORMS)

When you have defined the collection, you can refer to individual items in it by specifying the name of the collection and the key. This code shows a #FRMDETAILS window for the currently selected employee:

INVOKE #DFORMS<#EMPNO>.SHOWFORM

And this code shows it for employee number A0070:

INVOKE #DFORMS<'A0070'>.SHOWFORM

Similarly, you can refer to this instance of a form when setting its properties:

set #DFORMS<#deptment> Caption(#deptment)

You can write generic routines for the events of the collection which are then triggered for any item in the collection:

EVTROUTINE HANDLING(#DFORMS<>.Closing)

When you save the form, the code is automatically reformatted.

Keyed collection Properties


Keyed collection Properties

Collects Property

KeepLast Property

KeyedBy Property

Style Property


Collects Property

Collects specifies the form

Use the Collects property to specify the type of component on which the component instances will be modeled.


KeepLast Property

KeepLast specifies how many instances of a component are maintained

Use the KeepLast property to specify how many items are maintained in a collection.

If you set KeepLast to 0, this property is ignored and no KeepLast checking is performed. In this case the number of items that can be added to the collection is only limited by machine and memory limitations.

The maximum value of the KeepLast property is 99. When an item is added to the collection that causes the KeepLast value to be exceeded, items are removed from the collection until the KeepLast count is satisfied again. The removed items are the items that have not been accessed for the greatest period of time.


KeyedBy Property

KeyedBy specifies the field used to identify a form instance

The KeyedBy property is used to specify the field by which items in a collection are identified.

The field used as the key has to be a repository-enrolled field.


Style Property

Style specifies what happens when the collection is accessed with a key that does not exist

The Style property specifies what happens when the collection is accessed with a key that does not exist in the collection. This property can have one of two values:

FACTORY. Use this value when you want a new instance of the type of component specified by the Collects property to be created whenever the collection is accessed using a key that does not exist in the collection. This new item is associated with the key and stored in the collection. Factory is the default value for the Style property.

COLLECTION. Use this value when you want a *NULL reference returned whenever the keyed collection is accessed using a key that does not exist in the collection. When this style of collection is used, the SET_REF and IF_REF commands need to be used to work with the collection. Collections of this style can collect abstract classes like PRIM_OBJT. The collection does not create any component instances so it is up to the Visual LANSA application to create the instance and assign the instance into the collection using the appropriate key.

For example:

DEFINE_COM CLASS(#PRIM_KCOL) NAME(#FORM_COL) COLLECTS(#PRIM_FORM) KEYEDBY(#EMPNO) STYLE(Collection)

IF full time employee

SET_REF COM(#FORM_COL<#CUR_EMPLNO>) TO(*CREATE_AS #FORM_FT)

else

if part time employee

SET_REF COM(#FORM_COL<#CUR_EMPLNO>) TO(*CREATE_AS#FORM_PT)

else

if contract employee

SET_REF COM(#FORM_COL<#CUR_EMPLNO>)
TO(*CREATE_AS #FORM_CT)
endif
endif
endif

Note: #FORM_FT, #FORM_PT and FORM_CT are all Visual LANSA Forms that inherit from PRIM_FORM.


Primitive Control

Base Visual Control

Root of LANSA Visual Component class hierarchy.

Primitive Control Properties

Primitive Control Events


Primitive Control Properties

Alignment Property

BusyCancelResult Property

BusyUpdates Property

BusyUpdatesOfParent Property

CanFocus property

Caption property

Cursor property

DataClass Property

DisplayPosition property

DragCursor property

DragStyle property

Enabled property

Focus property

Handle property

HasFocus property

Height property

Hint property

HintShow property

HintShowOfParent property

Image property

ImageExpanded property

ImageOverlay property

ImageState property

Left property

ModalResult property

Modified property

Parent property

PopupMenu property

ReadOnly property

ScreenLeft property

ScreenTop property

SelectionEnd property

SelectionStart property

ShowError property

ShowLines property

ShowSortArrow property

TabPosition property

TabStop property

Text property

Value property

VerticalAlignment property

Visible property

VisualStyle property

VisualStyleEdit property

VisualStyleOfParent property

Width property


Alignment Property

Alignment aligns or centers the component

Use the Alignment property to specify whether the text in the component should be left-justified, centered or right-justified.


BusyCancelResult Property

This property is not available for use.


BusyUpdates Property

BusyUpdates specifies how the control updates itself

Use the BusyUpdates property to specify how a component updates itself when it is changed during a busy operation.

It can have one of the following properties:

Wait - (the default) causes the visual component to wait until the end of the busy operation.

Immediate - causes the visual component to be updated at the next updating opportunity.

Interval01 - causes the visual component to be updated approximately every 2 seconds.

Interval02 - same as Interval01 except the interval is twice as long - 4 seconds.

Interval04 - same as Interval01 except the interval is four times as long - 8 seconds


BusyUpdatesOfParent Property

BusyUpdatesOfParent specifies whether the parent controls updates

Use the BusyUpdatesOfParent property to specify whether the BusyUpdates property of components is managed at a container/form level.

If this property is set to True, the BusyUpdates of the component's parent is used.


CanFocus property

CanFocus returns a value indicating whether the control can receive focus.

CanFocus will return True if the control can receive focus; otherwise, False.

In order for a control to receive input focus:

  • the control must be realized and have a window handle assigned to it
  • the Visible and Enabled properties must both be set to True for both the control and all its parent controls
  • the control must be a form or the control's outermost parent must be a form.


Caption property

Caption is the visible text of the component

Caption is the visible text of the component. How the caption is shown depends on the type of component: for a push button it is the text displayed on the button, for a form is its title, for a check box it is the text that appears next to it, for a menu item it is the name of the menu option, for a graph it is the title.

You can use the Caption property to assign an access key to a component. In the caption, include an ampersand (&) immediately preceding the character you want to designate as an access key. The character will be underlined. When the user presses the ALT key plus the underlined character, focus is moved to that component. The user can then press the Enter key to trigger the Click event for the component.

Note that access keys work for a label only if it has a FocusControl specified.

When you click on the Caption property, a button with ellipses (three dots) is displayed. Click on it to select a multilingual variable as the caption. At design time the text in the multilingual variable is displayed in the language specified as the Current Language in the Options menu. At run-time the text is displayed in the language selected for the partition.

If you enter a caption in the RDMLX source code, put it in single quotes. If you enter it in the Properties sheet, the quotes will be added automatically.


Cursor property

Cursor sets the cursor image

Use the Cursor property to set the image displayed when the mouse pointer is on a component at run time.

You can use this property when you want to indicate changes in functionality as the mouse pointer passes over a component. You can choose from system cursors and cursors defined in your LANSA repository. These include standard cursors shipped with the product and possibly also user-defined cursors.


DataClass Property

DataClass controls the information shown in the control

Use the DataClass property to specify what information is shown at run-time in a component.

The value of the DataClass property can be a field or *NULL. When the value is *NULL, no data class is specified. When a field is specified as the value of DataClass, the value of this field is shown in the component and the editing rules of the field are used for the value entered. You can specify any field as the value of DataClass, provided its type is appropriate for the control.

To add a field as the value of the DataClass property click on the value of DataClass and then click the button with ellipses (three dots). Choose a field.

When you have assigned a field as the value of the DataClass property, a data class definition for that field is created:

DEFINE_COM CLASS(#STD_NUMBR) NAME(#STD_NUMBR)

To understand the difference between a field as data class and a field displayed on a form, you should note that a field which is dragged to a form creates this component definition:

DEFINE_COM CLASS(#STD_NUMBR.Visual) NAME(#STD_NUMBR)

The Visual qualifier of the component class means that a visual representation of the component is created, whereas the data class description simply specifies a non-visual component of the type and attributes of the field.

A data class component can be used in:

EDIT BOX: You would not normally use a field as the DataClass value of an edit box because it is simpler just to use the field itself.

SPIN EDIT BOX: When you want a numeric field to be displayed with spin edit buttons, you add a spin edit box to your form and then specify the field as its DataClass value. For example, if you add the field #STD_NUM to a form, it is displayed as a plain input/output field. To display this field with spin buttons, you must first add a spin edit box and then assign the field #STD_NUM as the DataClass property of the spin edit. The spin edit box will then behave exactly like the #STD_NUM field apart from the spin buttons.

Spin buttons are used to increment numbers and therefore only a numeric field can be used as value of DataClass in a spin edit box.

COMBO BOX: Specify a DataClass to use the editing rules (for example type or length) of the data class component for the value entered.

Also, the edit portion of the combo box shows the value of the current item of the first column (DisplayPosition 1). If you want the value of a field other than the one that was used as the source of its first column to be shown in the edit area, specify this field as its DataClass. This field can be one of the fields used as the source of other columns in the combo box or any other field in the repository.

Normally you would not specify any of the fields used as columns in the combo box as the DataClass value because if you want a column displayed in the edit area, it is simpler to change its DisplayPosition to 1. A more typical usage would be to create a field that combines the current values of several columns and use this field as the DataClass so that all the values are visible in the edit area. For example if the combo box has a column for given name and surname of an employee, a field that concatenates the values of these two fields could be used as the DataClass.

PROPERTY SHEET: Every entry in a property sheet has to be based on a data class. For more information, refer to the property sheet help text.


DragStyle property

DragStyle determines how a component can be dragged

Use the DragStyle property to control how the component can be dragged. The property can have these values:

None means that the component does not support the initiation of a drag operation.

Automatic means that once the mouse goes down and moves a predefined distance, a StartDrag event is triggered and a drag operation begins.

Aggregated means that the DragStyle of this component is the same as the DragStyle of its parent. If the parent's DragStyle is Automatic and a drag operation is started on the child component, a StartDrag event is triggered on the parent and a drag operation begins.


DisplayPosition property

DisplayPosition determines how components are shown

Use the DisplayPosition property to place a specified component at the front or back of the relative order in which controls are shown within a parent component.

In addition to a form, a parent component can be any kind of list (list box, list view, tree view, or grid), a tab folder or a tab sheet, a status bar or a panel, in other words, any component that can hold other components.

For lists the DisplayPosition of a column determines the order in which columns are displayed within a list. It also determines whether the column is visible (a column with the Visible property set to False has a display position of 0).

Note that a tree view can only have one column visible per level.

In a tab folder DisplayPosition determines the order of tab sheets.

In a status bar DisplayPosition determines the order of components together with MessagePosition.


DragCursor property

DragCursor sets cursor image when dragging

Use the DragCursor property to set the cursor image displayed when the component is dragged.

Use this property to provide visual feedback during a drag-and-drop operation for example to indicate that the component being dragged is over an appropriate target. DragCursor takes effect when the user initiates a drag-and-drop operation.


Enabled property

Enable activates/deactivates the component

Use the Enabled property to specify whether a component can respond to user-generated events.

Use this property to enable and disable components at run time. For example you can disable components that do not apply to the current state of the application.

To make a component write-protected without disabling it, use the ReadOnly property.

This code disables push-button #PHBN_1:

SET COM(#PHBN_1) ENABLED(FALSE)

See also SET example 161: Enablement and Disablement of Component on Forms.


Focus property

Focus tells whether the component has focus

Use the Focus property to determine whether a component has the focus. This property can be set to True or False.

The user can set the focus using the keyboard or the mouse. Focus can also be set programmatically using the SetFocus method.

When a component receives the focus, the GotFocus event is triggered and when focus is moved away from the component the LostFocus event is triggered.


Height property

Height sets the height of the component

Use the Height property to set the height of the component in pixels.

You can also adjust the height visually by selecting a component and then dragging from the size grips; the pixel value is adjusted automatically.

To size several components at time, use the Size and Align options of the Edit menu.


Handle property

A read-only property.

The Handle property gives you the handle of the underlying Windows window. It enables support for certain ActiveX controls.


Hint property

Hint is a brief description for component

Use the Hint property to enter a brief description for a component. It is displayed at run time when the user passes the cursor over a component.

When you want to display hints for items in lists, tree views, grids and property sheets, use the ItemHintText event and set the ShowItemHint property to True.


HasFocus property

HasFocus indicates whether component has focus

Use the HasFocus property to activate a component or to find out whether it is active. This property is used at run time only. For example you could use the HasFocus property to find out which tab sheet of a tab is active.


Image property

Image specifies the image used in a component

Use the Image property to specify the image used in a component.

For a push button, a toolbar button and image, the value of the Image property can be a repository-enrolled bitmap or icon.

For a tree view, list view and tab sheet the value of the Image property can be a repository-enrolled icon.

In both tree views and list views the image precedes individual items. In a tree view the Image property can be specified either as a value of a tree view column, or at run time as the value of individual items. In a list view the image can only be specified at run time for individual items.

This code sets #IconB for list items with surname Brown and #EmpIcon for all other list items:

SELECT FIELDS(#ltvw_1) FROM_FILE(pslmst)

add_entry to_list(#ltvw_1)

IF COND'#SURNAME *EQ BROWN'
SET COM(#LTVW_1.CURRENTITEM) IMAGE(#ICONB)
ELSE
SET COM(#LTVW_1.CURRENTITEM) IMAGE(#EMPICON)
ENDIF
ENDSELECT

You can also use an image in the column header of a list view column. This image must be a repository enrolled icon. Note that when you assign an image to a column header, all items in the first column are adjusted to the right by the space required by the icon in the header, even if the items itself have no icons.


ImageExpanded property

ImageExpanded indicates the status of an item

Use the ImageExpanded property to specify a repository-enrolled icon to be used for a tree view item when it has been expanded. When the item is collapsed, the image specified in the Image property is displayed.

This code sets the icon for an expanded tree view item to #OPENFLR:

SET COM(#LTVW_1.CURRENTITEM) IMAGEEXPANDED(#OPENFLR)


ImageOverlay property

ImageOverlay superimposes another image on an icon

Use the ImageOverlay property to specify a repository-enrolled icon which will be superimposed on the image of a tree view or a list view item.

An example of an overlay image is a cross or a circle with a bar superimposed on an image to indicate that the particular item is not available or that its meaning is reversed or negated.


ImageState property

Use the ImageState property to specify a repository-enrolled icon used to indicate the status of a tree view or list item. A state image is placed before the image of the item.

To see an example of a state image have a look at the images preceding forms in the LANSA Field/Component list which indicate their build status.

This code sets the state image to #OK for the current list item:

SET COM(#LTVW_1.CURRENTITEM) ImageState(#OK)


Left property

Use the Left property to specify the distance between the left edge of a component and the left edge of its container in pixels.

You can also adjust the position visually by selecting a component and then dragging it; the pixel value in the property sheet is adjusted automatically.

To position several components at time, use the Align options of the Edit menu.


ModalResult property

ModalResult tells how a modal form was closed

Design-time property of push-button, run-time property for forms.

Use the ModalResult property when you display a form using the ShowModalForm method to find out how the user closed the form. When the form closes, the form's ModalResult property indicates the button (or another action) that was used to close it.

At design time you can assign a ModalResult to each push button on the form by choosing one of the values Abort, Cancel, Ignore, No, None, OK, Retry and Yes. When one of these push buttons is pressed at run time, it automatically assigns its ModalResult value to the form it is in.

You can also write event routines that assign ModalResult values to the events of other controls than push-buttons.

Closing a form causes the ModalResult to be set to the value Cancel. The value None indicates that no result has yet been received and that the form should continue to run in modal state.

None of the other values have predefined meanings.


Modified property

A run-time property.

Use the Modified property to check whether the contents of the component have been changed by the user.

This property is automatically set to True when the user makes a change in the component. The Modified flag is not set on when the contents of the component are changed programmatically.

Forms and other container components (such as panels, tabs, tab sheets and group boxes) have their Modified property set to True when any component on them has this property set to True. When the modified property of a container is set to False, the Modified property of all controls on it will be reset.

The Modified property is set to True when the user:

  • changes the ButtonChecked state of a radio button or the the ButtonState property of a check box
  • changes the value in a field, an edit box, spin edit box, multiline edit box or a trackbar
  • changes the value in the edit portion of a combobox or moves focus to another item in it.
  • changes the focus/selection in a list box, list view or tree view. In a list view and a tree view changing the caption of an item also sets the Modified property to True.
  • changes the value in a grid cell or a property sheet item or moves the focus/selection to another item in the grid or property sheet.

For a toolbar button this property is never set automatically to True (it has to be set programmatically).

After you have dealt with the contents of the control, set the Modified property back to False.


Parent property

Parent is the container of the component

Parent is the component that contains this component. The parent can be for example a form, a group box or a panel. You cannot move a component outside its parent.

When you drag components to a container, LANSA automatically assigns the container as the parent. For example, if you drag a radio button to a group box, the component definition will contain a Parent property:

DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_1) PARENT(#GPBX_1)


PopupMenu property

PopupMenu call a pop-up menu

Use the PopupMenu property to specify the name of a pop-up menu to be displayed when the user selects the component and then clicks the right mouse button.

A pop-up menu is created using the pop-up menu component.


HintShowOfParent property

HintShowOfParent sets my HintShow based on my parents

Use the HintShowOfParent property to control whether to apply the HintShow property of the container of the component.

If this property is set to True, the component's hint property is controlled by the HintShow property of the form, panel, group box, tab folder or tab sheet which contains it.


HintShow property

HintShow sets hints on/off

Use the HintShow property to set the component's hint on or off. When this property is set to True, the description defined in the Hint property of the component is displayed.

Note that if the HintParentShow property is set to True, the value of this property is ignored.


ScreenLeft property

ScreenLeft sets the distance from the left of the screen

Use the ScreenLeft property to control the distance of this component from the left side of the screen.

The ScreenLeft property is calculated in pixels based on the current screen size.

You would typically use this property to control the position of forms in a multi-form application.

To see how this property is used, copy and paste the following code to two forms:

Form 1:

FUNCTION OPTIONS(*DIRECT)
BEGIN_COM FRAMESTYLE(Dialog) HEIGHT(89) LEFT(436) TOP(218) WIDTH(257)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#BTN_CLOSE) BUTTONDEFAULT(True) CAPTION('Close') DISPLAYPOSITION(1) HEIGHT(32) LEFT(40) PARENT(#COM_OWNER) TABPOSITION(1) TOP(16) WIDTH(177)
EVTROUTINE HANDLING(#com_owner.Initialize)
SET COM(#com_owner) CAPTION(*component_desc)
ENDROUTINE
EVTROUTINE HANDLING(#BTN_CLOSE.Click)
INVOKE METHOD(#com_owner.CloseForm)
ENDROUTINE
END_COM

Form 2:

FUNCTION OPTIONS(*DIRECT)

BEGIN_COM CAPTION('Screen Positioning Example') HEIGHT(293) LEFT(361) TOP(226) WIDTH(497)
DEFINE_COM CLASS(#FORM1) NAME(#POSTEST)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Show Form Top Left') DISPLAYPOSITION(3) LEFT(112) PARENT(#COM_OWNER) TABPOSITION(3) TOP(88) WIDTH(137)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_2) CAPTION('Show Form Top Right') DISPLAYPOSITION(4) LEFT(256) PARENT(#COM_OWNER) TABPOSITION(4) TOP(88) WIDTH(128)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_3) CAPTION('Show Form Bottom Left') DISPLAYPOSITION(2) LEFT(112) PARENT(#COM_OWNER) TABPOSITION(2) TOP(120) WIDTH(137)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_4) CAPTION('Show Form Bottom Right') DISPLAYPOSITION(1) LEFT(256) PARENT(#COM_OWNER) TABPOSITION(1) TOP(120) WIDTH(128)
EVTROUTINE HANDLING(#PHBN_1.Click)
DEFINE FIELD(#TOP) TYPE(*DEC) LENGTH(7) DECIMALS(0)
DEFINE FIELD(#LEFT) TYPE(*DEC) LENGTH(7) DECIMALS(0)
CHANGE FIELD(#TOP) TO('#PHBN_1.screentop - #POSTEST.HEIGHT')
CHANGE FIELD(#LEFT) TO('#PHBN_1.screenleft - #POSTEST.WIDTH')
SET COM(#POSTEST) TOP(#TOP) LEFT(#LEFT)
INVOKE METHOD(#POSTEST.showform)
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_2.Click)
CHANGE FIELD(#TOP) TO('#PHBN_2.screentop - #POSTEST.HEIGHT')
CHANGE FIELD(#LEFT) TO('#PHBN_2.screenleft + #PHBN_2.width')
SET COM(#POSTEST) TOP(#TOP) LEFT(#LEFT)
INVOKE METHOD(#POSTEST.showform)
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_3.Click)
CHANGE FIELD(#TOP) TO('#PHBN_3.screentop + #PHBN_3.HEIGHT')
CHANGE FIELD(#LEFT) TO('#PHBN_3.screenleft - #POSTEST.width')
SET COM(#POSTEST) TOP(#TOP) LEFT(#LEFT)
INVOKE METHOD(#POSTEST.showform)
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_4.Click)
CHANGE FIELD(#TOP) TO('#PHBN_4.screentop + #PHBN_4.HEIGHT')
CHANGE FIELD(#LEFT) TO('#PHBN_4.screenleft + #PHBN_4.width')
SET COM(#POSTEST) TOP(#TOP) LEFT(#LEFT)
INVOKE METHOD(#POSTEST.showform)
ENDROUTINE
EVTROUTINE HANDLING(#com_owner.closing)
INVOKE METHOD(#POSTEST.closeform)
ENDROUTINE
END_COM


ScreenTop property

ScreenTop sets the distance from the top of the screen

Use the ScreenTop property to control the distance of this component from the top of the screen.

The ScreenTop property is calculated in pixels based on the current screen size.

You would typically use this property to control the position of forms in a multi-form application.

See the ScreenLeft property for an example.


ShowError property

ShowError sets the error state on/off

Use the ShowError property to set a component's error state on or off. When this property is set to True, the background color of the component is set to the Error BackColor.

Note that when the component is a field or a grid cell, the ShowError property can be set implicitly by:

  • Validation checks
  • An event routine firing optionally clearing the error state

For information on how to use the LANSA validation checks, refer to the LANSA Technical Guide or the online help.


ShowLines property

ShowLines controls whether grid lines are visible. Set this property to False to hide the grid lines.

For this property to take effect in a grid, the SortOnClick property of the column must be set to True.


SelectionStart property

SelectionStart sets the starting point for a selection

A run-time only property.

Use the SelectionStart property to specify the character position where a selection starts.

Note that if the AutoSelect property is set to True, it selects the entire contents of the edit box, so in order to use the SelectionStart and SelectionEnd properties you need to set AutoSelect to False.


SelectionEnd property

SelectionEnd sets the ending point for a selection

A run-time only property.

Use the SelectionEnd property to specify the character position where a selection ends.

Note that if the AutoSelect property is set to True, it selects the entire contents of the edit box, so in order to use the SelectionStart and SelectionEnd properties you need to set AutoSelect to False.


ShowMessages method

For LANSA Product Centre's internal use only.


ShowMessageSet method

For LANSA Product Centre's internal use only.


ShowSortArrow property

ShowSortArrow shows or hides the arrow indicating sort direction.

Use the ShowSortArrow property to show or hide the arrow on the column header buttons which indicates the sort direction.


TabPosition property

TabPosition sets the order of focus

TabPosition controls the order in which this component gets the focus when the user presses the TAB key.

If you set the TabPosition of a component to 1, at run time it is the first component to receive focus when the user presses the TAB key.

By default a tab order is assigned to components as you drag them to a form or a part. Each new component is placed last in the tab order. If you change the value of a component's TabPosition property, the tab order of other components is adjusted.

All components except menus and timers are included in the tab order. At run time, invisible or disabled components and components that can't receive the focus are skipped.


TabStop property

TabStop controls the use of TAB key

Use the TabStop property to control whether the TAB key can be used to move focus to an object. When this property is set to True, the Tab key is enabled. Use this property to add or remove a component from the tab order.


Top property

Top sets the top distance of the component

Use the Top property to set the distance between the top edge of a component and the top edge of its container in pixels.


VerticalAlignment property

Use the VerticalAlignment property to align the label vertically. The position can be top, bottom or center. Top is the default position.


Visible property

Visible shows/hides component

Use the Visible property to control whether a component is visible or hidden at run time.

To hide a component, set this property to False.

Setting this property in code enables you to hide or display a component at run time in response to a particular event. This code hides push-button #PHBN_1:

SET COM(#PHBN_1) VISIBLE(FALSE)


VisualStyle property

VisualStyle sets the appearance

Use the VisualStyle property to control the appearance of a component.

The visual style components the colors, fonts and other style elements in your application.

You can choose from visual styles defined in your LANSA repository. These include standard styles shipped with the product and possibly also user-defined visual styles.

See also SET example 197: Visual Styles.


VisualStyleEdit property

VisualStyleEdit sets the appearance of the edit portion of a control

Use the VisualStyleEdit property to control the appearance of the edit portion of a component.

The visual style components the colors, fonts and other style elements in your application.

You can choose from visual styles defined in your LANSA repository. These include standard styles shipped with the product and possibly also user-defined visual styles.

See also SET example 197: Visual Styles.


VisualStyleOfParent property

VisualStyleOfParent sets the appearance from parent's Visual style

Use the VisualStyleOfParent property to control the appearance of a component based on the visual style assigned to the component's parent visual component.


Width property

Use the Width property to specify the width of the component in pixels.

You can also adjust the width visually by selecting a component and then dragging from the size grips; the pixel value is adjusted automatically.

To size several components at time, use the Size and Align options of the Edit menu.

For list view and grid columns, the value of the Width property depends on the setting of the WidthType property. If the WidthType is Scaleable or fixed, the Width property expresses the percentage of the list or grid taken up by the column.

For example, if the list view contained five scaleable or fixed columns of equal size, the Width of each column would be 20.

If the WidthType is Character, the Width property sets the width of the column as a number of characters. If the WidthType is Remainder, the Width property is ignored.


ReadOnly property

ReadOnly controls whether a component can be used for input. Set this property to True to make a component read-only.


Text property

Text contains the formatted data currently showing in the edit area.

Use the Text property to retrieve the formatted data currently showing in the edit area. This property is read only.

To set the text or to retrieve the unformatted data use the Value property of the edit box.


Value property

Use the Value property to retrieve the current value of a field component, a field visual component, primitive visual controls (like combo box, edit box, spin edit, progress bar and track bar), a grid cell and a primitive data class (like PRIM_ALPH, PRIM_NMBR and PRIM_DATE).

Except for grid cell, the Value property can also be used to change the current value of these components.


Primitive Control Events

Activate event

Changed event

Click event

DoubleClick event

DragDrop event

DragOver event

EndDrag event

Exit event

Form parameter

GotFocus event

Initialize Event

Initialize Event

KeyPress Event

LostFocus event

PrompterActivate event

PrompterDeactivate event

StartDrag Event


Activate event

The Activate event happens when a component is activated.

A form becomes the active window when keyboard focus is set to it. The active window is the topmost window on the desktop and its title bar and border (if it has one) is highlighted.

The user activates a window by clicking it, by selecting it using the Alt Tab or Alt Esc key combinations or the task bar.

The activate event happens frequently when the user moves between windows on the desktop. You should use this event only when you want the form to perform an action every time it gets keyboard focus. Actions related to initializing the form (filling lists, setting default values etc.) should be placed in the Initialize event of the form.


Changed event

Changed is a change in the component

The Changed event occurs when the contents of a component are changed.

In a graph this event is triggered after all updates are completed, not when loading single records.

In lists, tree views and grids the Changed event is triggered when all updates are completed (unlike the Selected/Focus events which are triggered on individual items).

In a combo box, the Changed event is triggered when the contents of the edit portion of the combo box are changed. The ComboChanged event is triggered when all updates are completed.


Click event

Click is a click of the mouse

The click event occurs when the user presses and then releases a mouse button over a component. A click can also occur when the value of a component is changed.

You write code to handle the Click event. For example this event routine for the Click event for push-button 1(#PHBN_1) makes push-button 2 invisible:

EVTROUTINE HANDLING( #PHBN_1.Click )
SET COM(#PHBN_2) VISIBLE(FALSE)
ENDROUTINE

For a form, the Click event occurs when the user clicks either a blank area or a disabled component.

For other components, this event occurs when the user clicks a component with the left or right mouse button. With a check box, push button, or radio button, the Click event occurs only when the user clicks the left mouse button.

Click event occurs also when the user selects an item in a combo box or list box control, either by pressing the arrow keys or by clicking the mouse button.

Similarly, a Click event also occurs when the user presses the space bar when a push button, radio button, or check box has the focus or when the user presses Enter when a form has a push button with its ButtonDefault property set to True or presses Esc when a form has a push button with its ButtonCancel property set to True.

Click events are also generated when the user presses an access key for a component. For example, if the caption of a push button component is "&&Go", pressing ALT+G triggers the event.

Note that a list view and a grid column can receive the Click event. The event is triggered when the user clicks on the column header or the grid button. The Click event is usually used to change the SortPosition and the SortDirection properties so that the user can sort the list according to the column. To receive this event, the list view must have the ColumnHeaders property set to True and the grid must have the ColumnButtons property set to True.


DoubleClick event

DoubleClick means two mouse clicks

DoubleClick occurs when the user presses and releases a mouse button and then presses and releases it again over a component.

For a form, the DoubleClick event occurs when the user double-clicks a disabled component or a blank area of a form.

Note that a list view and a grid column can receive the DoubleClick event. The event is triggered when the user double-clicks on the column header. To receive this event, the list view must have the ColumnHeaders property set to True and the grid must have the ColumnButtons property set to True.


Exit event

Exit event occurs when a component loses the focus.

Focus is moved either by user action, such as tabbing to or clicking another object, or by changing the focus in code using the SetFocus method.


StartDrag Event

StartDrag means mouse press and move

The StartDrag event occurs when the mouse button is pressed over a component and the mouse is moved.

For examples of drag-and-drop operations refer to SET example 223 and the Developer Guide.

StartDragEvent Source

DragDrop Aggregated Source

StartDragEvent Payload

StartDragEvent Continue

StartDragEvent DragList


StartDragEvent Source

The Source of a StartDragEvent operation is the component from which the operation starts.


DragDrop Aggregated Source

The AggregatedSource of a DragDrop operation is the component at the top of the aggregation chain that contains the Source of the DragDrop operation.

When the DragStyle of the Source component is Automatic, the AggregatedSource component is the same as the Source component.

When the Source component has a DragStyle of Aggregated, the AggregatedSource component will be one of the Source component's parents.


StartDragEvent Payload

The Payload is the component being dragged and dropped.

The Payload can be anything that enables the drop target to work out:

  • Whether the drop target supports the thing being dragged (to enable this, you generally need some kind of indicator in the payload that can be tested by the drop site. This indicator could be as simple as a piece of text or a number or it could be as complex as testing the class of the payload via IF_REF).
  • What data is needed by the drop target once a drop occurs in order to process the drop operation. To enable this, the Payload could carry a simple value, or a working list or a keyed collection of Visual LANSA components that contain the keys of the objects being dragged.


StartDragEvent Continue

Set this parameter to True to go ahead with the drag operation.


StartDragEvent DragList

Optional parameter.

Draglist is the image shown when the drag is happening.

Double-click on DragList in the tree on the left to view the help text for the DragList component.


DragDrop event

DragDrop means dropping a component

DragDrop occurs when a component is dragged over a form or other component and the mouse button is released.

Use a DragDrop event routine to specify what happens after a drag operation is completed. For example, you can move the source component to a new location or copy a file from one location to another.

For examples of drag-and-drop, refer to the Developer Guide.

DragDrop PosX

DragDrop PosY

DragDrop Source

DragDrop Aggregated Source

DragDrop Payload


DragDrop PosX

PosX determines the position of the mouse in relation to the X co-ordinate.


DragDrop PosY

PosY determines the position of the mouse in relation to the Y co-ordinate.


DragDrop Source

The Source of a DragDrop operation is the component from which the operation starts.


DragDrop Payload

The Payload is the component being dragged and dropped.

The Payload can be anything that enables the drop target to work out:

  • Whether the drop target supports the thing being dragged (to enable this, you generally need some kind of indicator in the payload that can be tested by the drop site. This indicator could be as simple as a piece of text or a number or it could be as complex as testing the class of the payload via IF_REF).
  • What data is needed by the drop target once a drop occurs in order to process the drop operation. To enable this, the Payload could carry a simple value, or a working list or a keyed collection of Visual LANSA components that contain the keys of the objects being dragged.


DragOver event

DragOver means drag over a component

Occurs when a drag-and-drop operation is in progress.

You can use this event to monitor the mouse pointer as it enters, leaves, or rests directly over a valid target. The mouse pointer position determines the target object that receives this event.

See examples of Drag-and-Drop in the Developer Guide.

DragOverEvent PosX

DragOverEvent PosY

DragOverEvent Source

DragDrop Aggregated Source

DragOverEvent Payload

DragOverEvent AcceptDrop

DragOverEvent ShowDropHilight

DragOverEvent DragCursor

DragOverEvent DragState


DragOverEvent PosX

PosX determines the position of the mouse in relation to the X co-ordinate.


DragOverEvent PosY

PosY determines the position of the mouse in relation to the Y co-ordinate.


DragOverEvent Source

The Source of a DragOverEvent operation is the component from which the operation starts.


DragOverEvent Payload

The Payload is the component being dragged and dropped.

The Payload can be anything that enables the drop target to work out:

  • Whether the drop target supports the thing being dragged (to enable this, you generally need some kind of indicator in the payload that can be tested by the drop site. This indicator could be as simple as a piece of text or a number or it could be as complex as testing the class of the payload via IF_REF).
  • What data is needed by the drop target once a drop occurs in order to process the drop operation. To enable this, the Payload could carry a simple value, or a working list or a keyed collection of Visual LANSA components that contain the keys of the objects being dragged.


DragOverEvent AcceptDrop

Set this parameter to True or False to accept or reject the object being dragged.


DragOverEvent ShowDropHilight

Set this parameter to True to show the item being dragged.


DragOverEvent DragCursor

Use the DragCursor parameter to specify the cursor displayed during the drag operation.


DragOverEvent DragState

The DragState indicates why the DragOver event has been triggered. It will contain one of the following values:

DsEnter: Mouse pointer has entered the component during a drag operation. This will always occur first.

DsMove: The mouse has moved but has stayed in the component's bounds.

DsHover: The mouse has not moved but a drag managed interval has expired and the the drag manager is letting the component know that the user has hovered. This is generally used by components that need to scroll, the ComboBox so that it can open its dropdown and the TreeView so that it can expand the children of an item being hovered.

DsExit: The mouse has left the component.


EndDrag event

EndDrag means the end of a drag

The EndDrag event occurs when the mouse key is released at the end of a drag operation. The start of a drag is signalled by the StartDrag event.

The EndDrag event is typically used to notify the source of the drag operation that the operation has ended.

For examples of drag-and-drop operations refer to SET example 223 and the Developer Guide.


EndDragEvent Source

The Source of an EndDragEvent operation is the component at which the operation ends.


EndDragEvent Payload

The Payload is the component being dragged and dropped.

The Payload can be anything that enables the drop target to work out:

  • Whether the drop target supports the thing being dragged (to enable this, you generally need some kind of indicator in the payload that can be tested by the drop site. This indicator could be as simple as a piece of text or a number or it could be as complex as testing the class of the payload via IF_REF).
  • What data is needed by the drop target once a drop occurs in order to process the drop operation. To enable this, the Payload could carry a simple value, or a working list or a keyed collection of Visual LANSA components that contain the keys of the objects being dragged.
  • EndDragEvent Source
  • DragDrop Aggregated Source
  • EndDragEvent Payload
  • EndDragEvent DragResult


EndDragEvent DragResult

This parameter indicates the result of the drag operation. It can have one of the following values:

Accepted - Drop was successful.

Ended - Drop happened but not in a place where it was accepted.

Cancelled - Something interrupted the drag, for example pressing ALT + TAB in the middle of a drag.


Initialize Event

Initialize happens when a component is loaded

The Initialize event happens when a component is first shown. You can, for example, use this event to load data to a list or a tree view when it is first displayed.

The Initialize event is triggered after the CreateInstance event. The CreateInstance event is signalled when the component is created, the Initialize event when information is presented visually for the first time. In many circumstances this distinction is not important. However, when you are dealing with non-visual components or when you want the component to process information before it is shown, use the CreateInstance event.


Form parameter

Use the Form parameter to specify the name of the prompter form.


GotFocus event

GotFocus happens when a component is activated

The GotFocus event happens when a component gets the focus on the desktop.

The user can set the focus on a component with a mouse-click or using the Tab key.

A form can only receive focus when the controls on it are disabled.

The focus can be moved programmatically using the SetFocus method.


LostFocus event

LostFocus happens when a component is no longer active

The LostFocus event happens when a component loses the focus on the desktop.

The user can move the focus on a component with a mouse-click or using the Tab key.

A form can only receive focus when the controls on it are disabled.

The focus can be moved programmatically using the SetFocus method.


PrompterActivate event

The PrompterActivate event is triggered when the user clicks on the prompter button.

Use this event to access the prompter form before it displays to perform processing such as filtering the entries.


PrompterDeactivate event

The PrompterDeactivate event is triggered when the prompter form is about to close.

Use this event to access the prompter form before it is closed.


KeyPress Event

KeyPress occurs when a keyboard key is pressed while the control has focus.

All printable character keystrokes will trigger a KeyPress event. In addition, any of the keys listed in KeyCodes will also trigger the event.

KeyPress is triggered each time a key is pressed before other processing. The event allows the application to monitor the keys being pressed, as well as change the keys as they are pressed.

Examples

This example does processing only when the Enter key is pressed:

Evtroutine Handling(#EDIT_1.KeyPress)

Options(*NOCLEARMESSAGES *NOCLEARERRORS) Com_Sender(#cur_comp) Keycode(#KeyCode)
* Process when the 'Enter' key is pressed
If Cond('#KeyCode = Enter')
Invoke Method(#com_owner.ProcessOnEnterKey)
Endif
Endroutine

This example changes all A characters to an exclamation mark as they are typed:

Evtroutine Handling(#EDIT_2.KeyPress)

Options(*NOCLEARMESSAGES *NOCLEARERRORS) Com_Sender(#cur_comp) Char(#CHAR) Keycode(#KeyCode)
* Change all "a" key presses to "!"
If Cond('#char = ''a''')
Set Com(#char) Value('!')
Endif
Endroutine

KeyCode parameter

Char parameter

IsAltDown parameter

IsControlDown parameter

IsShiftDown parameter

Handled parameter


KeyCodes
Enter | Escape | F12 | Plus | Subtract
BackSpace | Insert | F13 | Minus | Divide
UpArrow | F1 | F14 | Add | Decimal
DownArrow | F2 | F15 | Application | NumPad0
LeftArrow | F3 | F16 | LeftWindows | NumPad1
RightArrow | F4 | F17 | RightWindows | NumPad2
Tab | F5 | F18 | CapsLock | NumPad3
BackTab | F6 | F19 | NumLock | NumPad4
Space | F7 | F20 | ScrollLock | NumPad5
Home | F8 | F21 | Pause | NumPad6
End | F9 | F22 | Print | NumPad7
PageUp | F10 | F23 | Help | NumPad8
PageDown | F11 | F24 | Multiply | NumPad9
Delete |  |  |  |

KeyPress Event

KeyCode parameter


KeyCode parameter

The KeyCode parameter returns the kind of key that was pressed. Its value can be:

IsChar

and any of the keys listed in KeyCodes.


Char parameter

The Char parameter returns the character that was pressed if the KeyCode is IsChar.


IsAltDown parameter

The IsAltDown parameter is always False.


IsControlDown parameter

The IsControlDown parameter is always False.


IsShiftDown parameter

The IsShiftDown parameter is set to True when the Shift key is pressed.


Handled parameter

Set the Handled parameter to True to indicate that the KeyPress has been handled and the control should not continue processing the keystroke.


Primitive Control Methods

UpdateDisplay Method

SetFocus Method

Realize Method

Unrealize Method


UpdateDisplay Method

UpdateDisplay updates the display immediately

Use the UpdateDisplay method to update the display of the component immediately. If the visual component is the parent of other components, they are updated as well. For example if a group box or a panel has fields on it and its display is updated using the UpdateDisplay method, also the fields are updated.

The method is useful if you are loading for example a grid and you want the display of the grid to be updated after every 100 records have been added. Note, however, that you should consider carefully when and where to use this method because it can slow down your application considerably.

The following event routine increments the value of two fields, #Num_1 and #Num_2. The fields are first set to null and the field #Std_Num which will be used as a loop counter is set to 500. In the loop the value of the fields is incremented. The display of field #Num_1 is updated dynamically as the numbers are incremented. The display of field #Num_2 is only updated when the event routine has finished.

EVTROUTINE HANDLING(#PHBN_1.Click)

Change Field(#Num_1 #Num_2) To(*Null)
Change #Std_Num 500
begin_loop to(#Std_Num)
Change #Num_1 '#Num_1 + 1'
Change #Num_2 '#Num_2 + 2'
invoke #Num_1.UpdateDisplay
end_loop
ENDROUTINE


SetFocus Method

SetFocus sets the focus on a component

Use the SetFocus method to set the focus on a component programmatically. (The user sets the focus using the mouse or the keyboard.)

The syntax of the SetFocus method is:

INVOKE #PHBN_1.SetFocus


Realize Method

Realize method creates a component dynamically

Use the Realize method to make a component visible dynamically. You would typically use this method with a collection of components to dynamically realize instances of the collection.

For example you could define a collection of check boxes keyed by the value of #EMPNO field to create a check box per employee. To do this you would specify:

DEFINE_COM CLASS(#PRIM_KCOL) NAME(#KCOL_1) COLLECTS(#PRIM_CKBX) KEYEDBY(#EMPNO)

You could then set properties of an instance of this collection at run time. In this example the check box will use the current value of the #SURNAME field as its caption:

Set COM(#KCOL_1<#EMPNO>) Parent(#COM_OWNER) Caption(#SURNAME)

And then make the check box visible:

Invoke #KCOL_1<#EMPNO>.Realize

Note that if you create many visual components, you can simply invoke the ShowForm method of the form containing all the new components instead of realizing each one individually. The ShowForm/ActivateForm/MaximizeForm/.. methods all ensure that all their contents are realized before actually performing the requested operations.

Note also that menu items are realized when their parent is set. MenuBars are only realized when they are assigned to a form and that form is realized. pop-up menus are realized when they are first needed. Submenus are realized when the menuitem that they are associated with is realized.


Unrealize Method

Unrealize removes a component

Use the Unrealize method to remove a component. Typically you would use this method to remove an instance of a collection which has been created dynamically using the Realize method.


Container component

Container component Properties

Container component

System intenal use only.


Container component Properties

ComponentControls property

EnableChildren Property

LayoutManager Property


ComponentControls property

ComponentControls is a collection of all the controls contained in this component.

The ComponentControls property gives you access to a collection of all the controls contained in this component.

Using ComponentControls you can do generic programming on all controls.


EnableChildren Property

EnableChildren specifies if the parent sets the Enabled property

Use the EnableChildren property to specify whether the parent of a component can set the Enabled property of the components it contains.

When this property is set to True, all the components contained in this component are enabled or disabled when the Enabled property of this component is set to True or False.

Using the parent component's Enabled property instead of setting the properties of individual components on it is in most cases more efficient to code and to maintain.


LayoutManager Property

The LayoutManager property is used to position components on a container such as form, group box, panel or tab sheet. You set a layout manager by selecting one of the layout managers from the Select Layout Management dialog. The available layout managers are:

Attachment. An attachment layout divides the container into five cells. The center cell expands to fill any available space.

Flow Layout. The Flow Layout Manager is used to position components in a display area by dividing the items into rows or columns and then flowing the items one after the other in the appropriate row/column.

The division into rows or columns is controlled by the Direction property and the number of rows/columns is controlled by the ItemsPerDivision property.

Grid Layout. The Grid Layout Manager is used to position components in a grid in rows and columns.

Split Layout. The Split Layout Manager is used to manage a component's display area so that the component's children are split either across or down the display area. The orientation property defines the direction of the divisions. Optionally, the items managed by this layout manager can be automatically sized as the component changes size and resizing dividers can be displayed so that application users are able to adjust the splits to their own liking.

The individual layout managers have properties. To see a description of the properties of a layout manager, select it as the value of the LayoutManager property of a component, then display the Outline, select the layout manager and view its Features help.


Push button

Push button Properties

Use a push button to allow the user to perform an action. To display text on a push button, set its Caption property. You write the code for the button in the Click event.

To trigger the Click event for a button when the user presses Enter, set the ButtonDefault property to True. To allow the user to choose the button by pressing Esc, set its Cancel property to True.

There are two other ways you can let the user perform an action: using a menu item or a toolbar button.


Push button Properties

ButtonCancel property

ButtonDefault property

ImagePosition property

Menu property

MenuPosition property

MenuSeparator property


ButtonCancel property

ButtonCancel enables the use of Esc key

ButtonCancel enables the user to click this push button by pressing the Esc key.

When the user presses the Esc key, the code in the Click event of the push button which has the ButtonCancel property set to True is executed. Normally you would set this property to True for a push button which is used to cancel changes. Only one button on a form can have this property set to True.


ButtonDefault property

ButtonDefault enables the use of Enter key

ButtonDefault enables the user to click this push button by pressing the Enter key.

When the user presses the Enter key, the code in the Click event of a push button which has the ButtonDefault property set to True is executed. Normally you would set this property to True for a push button which the user is most likely to use. Only one button on a form can have this property set to True.

If the user has moved the focus to another push button on the same form, pressing Enter chooses the push button that has the focus instead of the default push button.


ImagePosition property

ImagePosition sets the position of the image relative to caption

Use the ImagePosition property to set the position of the image relative to the button's caption.

Note that this property is ignored when the AutoSize property is set to True.


Menu property

Use the Menu option to specify a pop-up menu to be associated with the button.

Typically you use buttons with menus on the toolbar.

A pop-up menu is created using the pop-up menu component.


MenuPosition property

Use the MenuPosition property to specify whether the menu will be displayed on the bottom or on the right of the button.


MenuSeparator property

Use the menu separator property to specify if the menu is separated from the rest of the button by a line.


Radio button

Use a radio button to show a group of mutually exclusive choices.

Use the ButtonChecked property to control the selection status of a button:

Set #rdbn_1 ButtonChecked(True)

This code checks whether the radio button is checked:
If '#rdbn_1.ButtonChecked = True'
Change #std_text 'Selected'
Endif

Radio buttons are used in a group from which the user can select only one.

While radio buttons and check boxes may appear to function similarly, there is an important difference: When a user selects a radio button, the other radio buttons in the same group are automatically deselected. In contrast, any number of check boxes can be selected.

For an advanced example about radio buttons, see SET example 65.

ButtonChecked property


ButtonChecked property

ButtonChecked indicates whether a radio button is selected

True indicates the button is selected; False (default) indicates the button is not selected.


Check box

Check box is used to present Yes/No choice

Use a check box to present a Yes/No choice. You would most commonly use a check box as a visualization style for a field which can have one of two values. If you intend to use it for another purpose, think carefully whether there is a better control for it.

The check box displays a tick when selected. The tick disappears when the check box is cleared. You use the ButtonState property to control and find out if the box is selected:

if cond('#ckbx_1.ButtonState *eq Unchecked')

change #std_bool 'False'
else
change #std_bool 'True'
endif

You can use check boxes in groups to display multiple choices from which the user can select one or more. (To display mutually exclusive choices, use radio buttons.)

ButtonState property


ButtonState property

ButtonState indicates whether a check box is checked

There are three button states: checked, unchecked and grayed. Unchecked is the default.

To let the user change this value by clicking, set the checked and unchecked values in the Click event of the component.

You would normally use the grayed state to indicate that the selections to which this check box applies have conflicting settings.


Toolbar button

Toolbar button Properties

Shortcut button on the toolbar

Use a toolbar (speed) button to allow the user to quickly perform an action.

There should be a toolbar button for the most commonly used actions in the application. Note that a toolbar button should never be the only way of triggering an action; all actions should be accessible from a menu as well.

To start creating a toolbar, drag a panel component (PRIM_PANL) to the form and size it. Usually a toolbar panel is placed underneath the form's menu bar.

To group toolbar buttons, you can add other panels to the toolbar panel.

To create the toolbar, drag toolbar buttons to the panel. Use the Image property of a button to specify a repository-enrolled bitmap to be displayed on it. Use the Caption property to add tex to the button and use the Hint property to add a tooltip description for it.

The size of a toolbar button is adjusted to the size of the bitmap on it. Typically bitmaps used on toolbar buttons are 16 x 16 pixels.

To create a separator between toolbar buttons, add a button and set its ButtonStyle to Separator.

For an example of how to dynamically create toolbars, see SET example 70.


Toolbar button Properties

ButtonStyle Property

GroupIndex Property

Check Property

AllowAllUp Property

ComponentVersion Property


ButtonStyle Property

ButtonStyle property makes the button 3D or flat

Use the ButtonStyle property to make the toolbar button appear as a three-dimensional button (Button) or a flat button (FlatButton). The borders of a flat button are not visible until the cursor is moved on the button.

You can also create a separator between buttons by adding a button and setting its style to Separator. This makes the button appear as a vertical line. Buttons with ButtonStyle Separator are simply used as visual markers, they cannot contain text or images or respond to events.


GroupIndex Property

Use the GroupIndex property of toolbar buttons to set up a group of buttons in which only one can be selected (pressed down) at the time.

The default for GroupIndex is 0 which indicates that there is no group. To form a group, set the GroupIndex of all the buttons in the group to the same number. For example if you have two groups of buttons, make the GroupIndex of all the buttons in the first group 1 and the GroupIndex of all the buttons in the second group 2.

The group indexes are unique in the parent of the toolbar buttons. So, for instance if your toolbar consists of two panels, both panels can have a group of buttons with the GroupIndex of 1.

To allow all the buttons in a group to be deselected at the same time, set the AllowAllUp property of the buttons to True.

To create a single toggle button (which stays down when the user has clicked it), you can do this by giving the button a group index of its own. Alternatively you can use the Check Property of the button.


Check Property

Use the Check property of a button to select it or deselect it or to find out whether a button has been selected. The button is selected (pressed down) when its Check property is set to True.

You can create a toggle button (which stays down when the user has clicked it) by using the Check property of button in its click event. Alternatively you can use the GroupIndex of the button.


AllowAllUp Property

Use the AllowAllUp property to specify whether all buttons with the same GroupIndex can be unchecked at the same time.


ComponentVersion Property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 11.0.

1 indicates LANSA version 11.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 a Toolbar button with AutoSize( false ) will not resize an Image that is larger than the bounds of the Toolbar button.


Static

Static Properties

Lines and shapes

Use the Static component to draw lines and shapes on a form.


Static Properties

DrawType Property

FrameHeightBottom Property

FrameHeightTop Property

FrameWidthLeft Property

FrameWidthRight Property

LineType Property

LineWidth Property


DrawType Property

Use the DrawType property to specify the kind of line or shape you want to create.

The available shapes are:

Lines | Lines can be horizontal or vertical. The line can be be plain or edged
Bars | Bars can be raised or sunken
Frames | Frames can have raised or indented edges
Ellipses | Elliptical shapes and circles
Rectangle | Rectangles can be plain or edged
Triangle | Triangles can point to different directions


FrameHeightBottom Property

Use the FrameHeightBottom property to control the height of the bottom frame.


FrameHeightTop Property

Use the FrameHeightTop property to control the height of the top frame.


FrameWidthLeft Property

Use the FrameWidthLeft property to control the width of the left frame.


FrameWidthRight Property

Use the FrameWidthRight property to control the width of the right frame.


LineType Property

Use the LineType property to specify how the lines are drawn.

Lines can be for example dashed, dotted or solid.


LineWidth Property

LineWith controls the width of the line

Use the LineWith property to specify the width of the line in pixels.


Label

Text description

Use a label to display text that the user cannot change directly.

You can write code that changes the text displayed by a label in response to events at run time. For example, if your application takes a few minutes to commit a change, you can display a message in a label. You can also use a Label to identify a control, such as an edit box, that doesn't have its own caption property.

Label Properties


Label Properties

Alignment Property

FocusControl Property

Ellipses Property


Alignment Property

Use the Alignment property to align the text of the label to the right, left or center.


FocusControl Property

Use the FocusControl property to specify which control on the form gets the focus when the user presses the access key of the label (Alt plus the underlined letter in the caption of the label).

This property is used to make it possible to move the focus to components which do not have a caption using the keyboard. For example as lists, tree views, combo boxes and grids do not have a caption.


Ellipses Property

Use the Ellipses property to control how the text in a label is truncated if it does not fit. This property can have these values:

None: The text is truncated.

Word: Text that does not fit in the label is truncated and ellipses are added.

End: If the end of a string does not fit in the label, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the label, it is truncated without ellipses.

Path: Characters in the middle of the string are replaced with ellipses so that the result fits in the label. If the string contains backslash (\) characters, as much as possible of the text after the last backslash is preserved.

To see how this property works, copy and paste the following code to a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) CAPTION('Label Ellipse Property Example') HEIGHT(147) LEFT(381) TOP(172) WIDTH(289)
DEFINE_COM class(#PRIM_LABL) name(#LABL_1) CAPTION('Text too long to fit in the label caption') DISPLAYPOSITION(1) HEIGHT(27) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(14) WIDTH(135) WORDWRAP(False)
DEFINE_COM class(#PRIM_LABL) name(#LABL_2) CAPTION('C:\Program Files\Too Long.txt') DISPLAYPOSITION(2) HEIGHT(25) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(56) WIDTH(135) WORDWRAP(False)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_1) CAPTION('Ellipses') DISPLAYPOSITION(3) HEIGHT(98) LEFT(168) PARENT(#COM_OWNER) TABPOSITION(3) TABSTOP(False) TOP(15) WIDTH(97)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_END) CAPTION('End') DISPLAYPOSITION(1) HEIGHT(18) LEFT(15) PARENT(#GPBX_1) TABPOSITION(1) TOP(23) WIDTH(50)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_NONE) BUTTONCHECKED(True) CAPTION('None') DISPLAYPOSITION(2) HEIGHT(17) LEFT(16) PARENT(#GPBX_1) TABPOSITION(2) TOP(40) WIDTH(57)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_PATH) CAPTION('Path') DISPLAYPOSITION(3) HEIGHT(17) LEFT(16) PARENT(#GPBX_1) TABPOSITION(3) TOP(56) WIDTH(49)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_WORD) CAPTION('Word') DISPLAYPOSITION(4) HEIGHT(17) LEFT(16) PARENT(#GPBX_1) TABPOSITION(4) TOP(72) WIDTH(65)
EVTROUTINE handling(#com_owner.Initialize)
SET com(#com_owner) CAPTION(*component_desc)
ENDROUTINE
SUBROUTINE name(DOELLIPSES)
IF cond('#RDBN_END.Buttonchecked = true')
SET com(#LABL_1) ELLIPSES(end)
SET com(#LABL_2) ELLIPSES(end)
ENDIF
IF cond('#RDBN_WORD.Buttonchecked = true')
SET com(#LABL_1) ELLIPSES(WORD)
SET com(#LABL_2) ELLIPSES(WORD)
ENDIF
IF cond('#RDBN_path.Buttonchecked = true')
SET com(#LABL_1) ELLIPSES(path)
SET com(#LABL_2) ELLIPSES(path)
ENDIF
IF cond('#RDBN_NONE.Buttonchecked = true')
SET com(#LABL_1) ELLIPSES(none)
SET com(#LABL_2) ELLIPSES(none)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_END.Click)
EXECUTE subroutine(DOELLIPSES)
ENDROUTINE
EVTROUTINE handling(#RDBN_NONE.Click)
EXECUTE subroutine(DOELLIPSES)
ENDROUTINE
EVTROUTINE handling(#RDBN_PATH.Click)
EXECUTE subroutine(DOELLIPSES)
ENDROUTINE
EVTROUTINE handling(#RDBN_WORD.Click)
EXECUTE subroutine(DOELLIPSES)
ENDROUTINE
END_COM


WrapStyle property

WrapStyle property determines how words are wrapped

Use the WrapStyle property to control word wrapping.

With WrapStyle Word text is wrapped at word boundaries, with WrapStyle Continuous the text is wrapped regardless of word boundaries.


Edit Box

Edit box is used for entering and displaying information

Use an edit box to display information and to allow the user to enter information.

The text can be entered in the edit box at design time, or at run time by the user or programatically.

Edit box is the default visualization style for fields. Before you use an edit box in your application, consider whether it would be more appropriate to use an existing field or to create a new field instead.

Edit Box Properties

Edit Box Methods


Edit Box Methods

SelectText Method


SelectText Method

The SelectText method selects text starting at StartPosition for Length characters.

Note that this will only be visible if the control has the focus before the text is selected.

The syntax of this method is:

Invoke (#Meditbox.SelectText) StartPosition(10) Length(8)

OR

Invoke (#Meditbox.SelectText) StartPosition(10)

SelectText StartPosition

SelectText Length


SelectText StartPosition

StartPosition specifies the first character in the selection.


SelectText Length

Length specifies the number of characters in the selection. If Length is 0 or unspecified, the cursor is placed at the position specified by StartPosition.


Edit Box Properties

DisplayAlignment property

EditAlignment property

CharacterCase property

HasSelection Property

PasswordChar property

ReadOnly property


DisplayAlignment property

DisplayAlignment sets edit box alignment when not in focus

Use the DisplayAlignment property to control how text is aligned in an edit box when the edit box does not have the focus.

This property can be set to Right, Left or Center.


EditAlignment property

EditAlignment sets the alignment of the edit box in focus

Use the EditAlignment property to control how text is aligned in an edit box when it has the focus.

This property can be set to Right or Left.


CharacterCase property

CharacterCase sets character case

CharacterCase displays characters in lowercase, mixed case or uppercase.


HasSelection Property

A read-only property.

HasSelection indicates whether text is selected.


PasswordChar property

PasswordChar hides password

PasswordChar indicates the character used as a placeholder for a password field.

Use this property to create a password field. Although you can use any character, most Windows-based applications use the asterisk (*).

This property does not affect the Text property; Text contains exactly what the user types or what was set from code. To display the password as it is entered, set this property to a zero-length string ("") which is the default.

You can assign any string to this property, but only the first character is significant; all others are ignored.


Spin edit box

Spin edit box is used to adjust a value

Use a spin edit display an edit box with spin buttons used to increment and decrement numbers. You can also use the buttons to scroll back and forth through a range of values.

Spin edit box Properties

Spin edit box Methods


Spin edit box Properties

Increment property

Wrap property


Increment property

Increment specifies how the spin buttons adjust the value

The Increment property specifies the amount of change effected by the spin buttons. For example an increment of 2 causes the numbers in the edit box to increase or decrease by two every time a spin button is pressed.


Wrap property

The Wrap property specifies what happens when the end of a range for a spin edit is reached.


Spin edit box Methods

Dec method

Inc method


Dec method

Use the Dec method to decrement the value in the spin edit box. The value is decremented by 1.


Inc method

Use the Inc method to increment the value in the spin edit box. The value is incremented by 1.


Multi-line edit box

Multi-line edit box has more than one line of text

Use a multi-line edit box to allow the user to enter or edit a long piece of text.

Even though the multi-line edit box looks very much like a simple edit box to the user, it functions as a list. In the multi-line edit box every line corresponds to a list entry. So, to fill a multi-line edit box, use the SELECT and ADD_ENTRY statements to add the lines. Similarly, to write the contents of the edit box to a file, use the SELECTLIST and INSERT commands.

See also SET example 200: Use a Multi-line Edit Box.

Multi-line edit box Properties

Multi-line edit box Methods


Multi-line edit box Properties

AddEntryMode property

CharacterPosition property

ComponentVersion property

CurrentLine property

DisableNoScroll property

EnableCut property

EnablePaste property

HasSelection Property

HorizontalScroll property

LineCount property

MarginLeft property

MaximumLineLength property

MaximumLines property

OnOutput property

OutputText property

ShowLineNumbers property

VerticalScroll property

WordWrap property


AddEntryMode property

AddEntryMode determines how data is added to the edit box

Use the AddEntryMode to control how data is processed in the multi-line edit box.

The property can be set to OnePerLine to process one entry per line, or to MultiplePerLine to process several entries per line.

Use the OnePerLine value for example when you want to display list-type information. This value sets the MaximumLineLength property of the multi-line edit box to the length of the field from which the column with ColumnRole Data is sourced.

Use the MultiplePerLine value when you want the contents of the database to be shown as continuous text. When data is retrieved from a file to the edit box, the entries are packed together to fill the line. Conversely, when text is extracted from the edit box using the SELECTLIST command, it is broken up to strings which correspond to the length of the field from which the column with ColumnRole Data is sourced. To preserve the data in the format it was entered, the edit box has to have a column with ColumnRole LineNumber and a column with ColumnRole LineContinuation.


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 the multi-line edit control will examine the attributes of the field defined as the data column and if that field does not have the *LC attribute, all text will be in uppercase.


CurrentLine property

Run-time read-only property. Use the CurrentLine property to determine the line where the cursor is positioned.


CharacterPosition property

Run-time property. Use the CharacterPosition property to determine or set the place of the cursor on a line.

When you clear an multi-line edit box, set the CharacterPosition to 0 to make sure the cursor is positioned in the top left corner of the box.


EnableCut property

Set the EnableCut property to True to allow the user to cut text.


DisableNoScroll property

Use the DisableNoScroll property to control whether scroll bars are visible when they are not needed. When this property is set to False the scroll bars only appear when the contents do not fit in the control.


EnablePaste property

Set the EnablePaste property to True to allow the user to paste text to the edit box.


HorizontalScroll property

HorizontalScroll displays or hides horizontal scroll bar

Set this property to True to display a horizontal scroll bar.

The scroll bar is enabled when the contents are wider than the control. For usability, avoid horizontal scroll bars.

In a multi-line edit box try to make the width of the edit box match the line length or consider setting the WordWrap property to True.


LineCount property

Run-time read-only property. Use the LineCount property to find out the number of lines the multi-line edit box currently has.


MarginLeft property

Use the MarginLeft property to set the margin between the left edge of the edit box and the text. The margin is specified in pixels.


MaximumLineLength property

Use the MaximumLineLength property to limit the number of characters that can be entered on a line.

When setting this property, consider the length of the field where the data is stored. You will also need to take into account the width of the edit box to avoid using horizontal scroll bars.

If the AddEntry Mode is OnePerLine, this property is automatically set to the width of the field from which the column with ColumnRole Data is sourced.

The user cannot type in more characters than the MaximumLineLength allows. However, when the edit box is filled automatically, the limit can be exceeded.


MaximumLines property

Use the MaximumLines property to specify the maximum number of lines the multi-line edit box control can have.


OnOutput property

OnOutput determines the output format of the text

Use the OnOutput property to control how data is to be formatted when it is stored. This property can have the following values:

None: The text is not altered

AddReturn: A carriage return character is appended at the end of every line

AddLineFeed: A line feed character is appended at the end of every line

AddNewLine: A carriage return character and a line feed character are added at the end of every line.

AddNull: A null character is appended at the end of every line.

AddSpace: A space is added at the end of every line.


OutputText property

OutputText is all the text in the multi-line edit box.

A read-only property. Use the OutputText property to retrieve the contents of the edit box.


ShowLineNumbers property

ShowLineNumbers controls whether line numbers are shown

Use the ShowLineNumbers property to control whether automatic line numbering should be visible.


VerticalScroll property

VerticalScroll displays or hides vertical scroll bar

Set this property to True to enable a vertical scroll bar.

Vertical scroll bars are displayed when the contents of the control do not fit its height.


WordWrap property

WordWrap controls word wrapping

Set the WordWrap property to True to turn word wrapping on.

In a multi-line edit box you would typically use word wrapping when the MaximumLineLength is longer than the width of the edit box so that all the text is visible and horizontal scroll bars need not be used.

In a label you set word wrapping on when you want the label to be displayed on more than one line.


Multi-line edit box Events

Positionchanged event

LineChanged event


Positionchanged event

Positionchanged is triggered when the cursor is moved

The PositionChanged event is triggered when the cursor is moved to another character position on the line


LineChanged event

LineChanged is triggered when the cursor is moved to another line

The LineChanged event is triggered when the cursor is moved to another line


Multi-line edit box Methods

Cut Method

Copy Method

Paste Method

Undo Method

Redo Method

SelectAll Method

SelectMultiLineText Method

Select Multiline Text

Find Method

Replace Method

Print Method


Cut Method

Cut deletes text and puts it in the clipboard

The Cut method deletes selected text and puts it in the clipboard.

The syntax of this method is:

Invoke #Meditbox.Cut


Copy Method

Copy copies text to the clipboard

The Copy method copies selected text to the clipboard.

The syntax of this method is:

Invoke #Meditbox.Copy


Paste Method

Paste pastes the contents of the clipboard.

The Paste method pastes the contents of the clipboard to the multi-line edit box.

The syntax of this method is:

Invoke #Meditbox.Paste


Undo Method

Undo Method reverses the last action

The Undo method reverses the last action in the multi-line edit box.

The syntax of this method is:

Invoke #Meditbox.Undo


Redo Method

Redo reapplies an action that was undone.

The Redo method reapplies an action performed in the multi-line edit box which had been reversed using the Undo method.

The syntax of this method is:

Invoke #Meditbox.Redo


SelectAll Method

SelectAll selects all text.

The SelectAll method selects all text in the multi-line edit box.

The syntax of this method is:

Invoke #Meditbox.SelectAll


SelectMultiLineText Method

SelectMultiLineText selects text over multiple lines.

The SelectMultiLineText method selects text starting at StartLineNumber, StartPosition up until EndLineNumber, EndPosition.

Note that this will only be visible if the control has the focus before the text is selected.

The syntax of this method is:

Invoke (#Meditbox.SelectMultiLineText) StartLineNumber(2) StartPosition(10) EndLineNumber(2) EndPosition(10)


Select Multiline Text

StartLineNumber parameter

StartPosition parameter

EndLineNumber parameter

EndPosition parameter


StartLineNumber parameter

StartLineNumber specifies the first line in the selection.


StartPosition parameter

StartPosition specifies the first position in the selection.


EndLineNumber parameter

EndLineNumber specifies the last line in the selection.


EndPosition parameter

EndPosition specifies the last character position in the selection.


Find Method

Find finds a string.

The Find method brings up a dialog box which can be used to locate a string in the multi-line edit box.

The syntax of this method is:

Invoke #Meditbox.Find


Replace Method

Replace finds and replaces a string.

The Replace method brings up a dialog box which can be used to locate a string in the multi-line edit box and to replace it with another.

The syntax of this method is:

Invoke #Meditbox.Replace


Print Method

Print method sends the text to a printer.

The Print method sends the contents of a multi-line edit box to a printer.

The syntax of this method is:

Invoke #Meditbox.Print


Form

A form is a display area representing a window, dialog or message box. You use forms to create the windows in your application. A form's properties determine aspects of its appearance, such as position, size, and color; and aspects of its behavior, such as whether or not it can be resized.

A form can respond to events initiated by a user or triggered by the system. For example, you could write code in a form's Click event routine that would enable the user to change the color of a form by clicking it.

Form Properties

Form Events

Form Methods


Form Properties

BorderIcons property

ClientHeight property

ClientWidth property

ComponentVersion property

FormOwner property

FormPosition property

FormStyle property

FrameStyle property

Icon property

Menubar property

NormalHeight property

NormalLeft property

NormalTop property

NormalWidth property

ScalingFactorHor property

ScalingFactorVer property

TitleBarVisible property

WindowState property


BorderIcons property

BorderIcons specifies the icons displayed in the top-right corner of the form. This property specifies which of the following icons is displayed in the top-right corner of the form:

Help

Maximize

Minimize

None

System Menu

Note that changes to the border icons are shown only at run time, not at design time. The Help icon cannot be specified if the Minimize or Maximize icons are displayed.

At run time when a form is maximized, the Maximize button is automatically changed to Restore button.


ClientHeight property

The ClientHeight property defines the height of the form's client area.

The Client area of a form is the area of the form excluding the sizing borders, title bar and menu bar areas.


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 the forms with a FormStyle of StayOnTop and StayOnTopChild will stay on top. Also, with forms that are executed on a desktop with different scaling factors (pixels per inch) than the desktop used to design the form, the form and its contents will be automatically scaled to match the scaling factor of the executing desktop.


ClientWidth property

ClientWidth specifies the width of the form's client area

The ClientWidth property defines the width of the form's client area.

The Client area of a form is the area of the form excluding the sizing borders, title bar and menu bar areas.


NormalTop property

NormalTop returns information about the Top property of the form in its restored size

The NormalTop property returns information about the Top property of the form in its restored size, even when the form is maximized or minimized.


NormalLeft property

NormalLeft returns information about the Left property of the form in its restored size

The NormalLeft property returns information about the Left property of the form in its restored size, even when the form is maximized or minimized.


NormalHeight property

NormalHeight returns information about the Height property of the form in its restored size

The NormalHeight property returns information about the Height property of the form in its restored size, even when the form is maximized or minimized.


NormalWidth property

NormalWidth returns information about the Width property of the form in its restored size

The NormalWidth property returns information about the Width property of the form in its restored size, even when the form is maximized or minimized.


FormOwner property

FormOwner specifies the form's owner

A run-time property.

Use the FormOwner property to specify the owner of an owned form in a multi-form application.

Before showing a member form it is good practice to set its owner form using the FORMOWNER property. This is because the first form that executes in an application becomes the owner of all member forms in the application by default, regardless of the basic structure of the application. In complex applications failing to set the owner form may cause unpredictable results.

This code sets the owner of the member form before showing it:

EVTROUTINE HANDLING(#MDetails.Click)

SET COM(#frmdetail) formowner(#com_owner)

invoke #frmdetail.ShowForm

ENDROUTINE


FormPosition property

FormPosition specifies the form's position

This property can have the following values:

Designed: Use the form's position and size set at design time.

Default: Use the default position and size of the form.

DefaultSizeOnly: Use the default size. The position is set at design time.

DefaultPositionOnly: Use the default position. The size is set at design time.

ScreenCenter: Position the form in the center of the screen.

The default size and position of forms is specified in the #STD_FORM component which you can modify.


FrameStyle property

FrameStyle sets the style of a form's frame

The value of this property can be:

Dialog: Not sizable, titlebar. Can include Help, Minimize and Maximize buttons. No system menu.

None: The form has no frame or title bar.

Sizable: Resizable using any of the border icons or the mouse.

Single: Can include Control menu box, title bar, Maximize button, and Minimize button. Resizable only using Maximize and Minimize buttons.

SizeToolWindow: Displays the Close button and displays the title bar text in a reduced font size. The form does not appear in the Windows task bar. Resizable.

ToolWindow: Displays the Close button and displays the title bar text in a reduced font size. The form does not appear in the Windows task bar.


FormStyle property

FormStyle specifies the form's style

Use this property to specify the behavior of the form at run-time.

Normal | The form is a standard form.
Owned | When this form is made a member form of another form, it will be closed when the owner form is closed.
StayOnTop | The window will stay on top of the form owner. This is often the initial form shown by an application.

When you set the style of a form to NormalChild, OwnedChild and StayOnTopChild, the form will be hidden or minimized when its parent form is hidden or minimized and it will be automatically closed when its parent form is closed. An OwnedChild form it will stay on top of its owner form and it does not appear on the task bar.

To see the difference between NormalChild and OwnedChild forms, copy and paste the following code to a form called FORMOWNEX, compile and execute it.

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(150) LEFT(296) TOP(111) WIDTH(253)
DEFINE_COM class(#PRIM_PHBN) name(#PHBN_1) CAPTION('Show Normal') DISPLAYPOSITION(1) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(1) TOP(8)
DEFINE_COM class(#PRIM_PHBN) name(#PHBN_2) CAPTION('Show Owned') DISPLAYPOSITION(2) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(2) TOP(48)
DEFINE_COM class(#PRIM_CKBX) name(#CKBX_1) CAPTION('Fail Close Query') DISPLAYPOSITION(3) LEFT(8) PARENT(#COM_OWNER) TABPOSITION(3) TOP(88)
DEFINE_COM class(#FORMOWNEX) name(#NORMALFORM) FORMSTYLE(NormalChild)
DEFINE_COM class(#FORMOWNEX) name(#OWNEDFORM) FORMSTYLE(OwnedChild)
EVTROUTINE handling(#PHBN_1.Click)
IF_REF com(#Com_Owner.FormOwner) is(*Null)
CHANGE field(#STD_NUM) to('#Com_Owner.Left + #Com_Owner.Width + 10')
ELSE
CHANGE field(#STD_NUM) to('#Com_Owner.Left + 10')
ENDIF
SET com(#NormalForm) FORMOWNER(#Com_Owner) LEFT(#Std_Num)
INVOKE method(#NormalForm.ShowForm)
ENDROUTINE
EVTROUTINE handling(#PHBN_2.Click)
IF_REF com(#Com_Owner.FormOwner) is(*Null)
CHANGE field(#STD_NUM) to('#Com_Owner.Top + #Com_Owner.Height + 10')
SET com(#OwnedForm) TOP(#Std_Num)
CHANGE field(#STD_NUM) to('#Com_Owner.Left + #Com_Owner.Width + 10')
ELSE
CHANGE field(#STD_NUM) to('#Com_Owner.Left + 10')
ENDIF
SET com(#OwnedForm) FORMOWNER(#Com_Owner) LEFT(#Std_Num)
INVOKE method(#OwnedForm.ShowForm)
ENDROUTINE
EVTROUTINE handling(#COM_OWNER.CloseQuery) options(*NOCLEARMESSAGES *NOCLEARERRORS) CONTINUE(#Option)
IF cond('#CKBX_1.ButtonState = Checked')
SET com(#Option) VALUE(False)
ENDIF
ENDROUTINE
END_COM


Icon property

Icon sets the icon for a form

Use this property to specify a repository-enrolled icon to be displayed as a small icon at the top left corner of the form and on the task bar.

Make sure that the icon you use is distinguishable as a small icon (16 x 16 pixels). If you don't specify an icon, the default icon for forms is used.


Menubar property

Menubar sets the menubar for a form

Use the Menubar property to specify which menu bar is used for the form. By default the value of this property is the first menu bar you create in a form.

Most commonly you only create one menu bar per form.


ScalingFactorHor property

ScalingFactorHor captures the horizontal scaling factor

The ScalingFactorHor property captures the scaling factor of the desktop on which the form is being designed.

The value is derived from the desktop's horizontal pixels per inch setting. These properties are used by Visual LANSA at runtime to automatically rescale a form and its contents if the form is running on a desktop whose scaling factors do not match the desktop used to design the form.


ScalingFactorVer property

ScalingFactorVer captures the vertical scaling factor

The ScalingFactorVer property captures the scaling factor of the desktop on which the form is being designed.

The value is derived from the desktop's vertical pixels per inch setting. These properties are used by Visual LANSA at runtime to automatically rescale a form and its contents if the form is running on a desktop whose scaling factors do not match the desktop used to design the form.


TitleBarVisible property

TitleBarVisible hides/shows the title bar

Set this property to False to hide a form's title bar.


WindowState property

WindowState controls how the window is displayed

Use this property to control the visual state of a form when it is run. When the window state is Normal, its size is set in the height and width properties.

Note that when the WindowState is set to Minimized the first time the form is displayed, it is displayed as Normal to avoid a situation where the form would not appear on the desktop.


Form Events

Closing event

CloseQuery event

Deactivate event


Closing event

Closing event happens when the user closes the form

The Closing event occurs when a form is about to be removed from the screen. The user can close a form using the system menu in the top-left corner of the form or the close border icon in the top-right corner of the form or, depending on the application, possibly also using a menu option or a button.

Action Parameter


Action Parameter

Action parameter is used to specify the action to take after form close

Use the Action parameter of the Closing event to specify what action is taken after the Closing event has been triggered. This parameter can have the value None, Hide, Minimize and Free.

Free is the default. It closes the window and frees the resources used by it.

Hide hides the form but keeps it active in the background so it can be quickly redisplayed.

None stops the form from being closed.

Minimize minimizes the form.

Note that if the form is shown modally, None and Free both close the window and free the resources used by it. In this situation you need to use the CloseQuery event to stop the closing of the form.


CloseQuery event

CloseQuery occurs before a form or application closes

The CloseQuery event occurs before a form closes. This event has a parameter Continue which can be set to True or False. Use it to bring up a dialog asking the user to confirm that he wants to go ahead with the Close event.

For an example of how to use this event refer to the Forms chapter in the Developer Guide.

Continue parameter


Continue parameter

Use the Continue parameter of the CloseQueryEvent to either confirm or stop the closing of the form. This parameter can be set to True or False.

The following event routine displays another form named #Dialog when this form is about to close. If the ModalResult value returned from #Dialog is No, the #Option field is set to False and this value is used as the value of the Continue parameter and the form is not closed. If the ModalResult value is not No, the form is closed:

EvtRoutine Handling(#Com_Owner.CloseQuery) Continue(#Option)

Invoke #Dialog.ShowModalForm
Define #QResult Reffld(#Std_Texts)
Change #QResult #Dialog.modalResult
Case #QResult
When '= No'
Invoke #Com_Owner.RestoreForm
Set #Option Value(FALSE)
OtherWise
Set #Option Value(TRUE)
EndCase
EndRoutine


Deactivate event

The Deactivate event happens when the form is deactivated.

The color of the title bar of the form changes when it is deactivated.


Form Methods

CloseForm method

CloseFormQuery method

ActivateForm method

HideForm method

MaximizeForm method

MinimizeForm method

ShowForm method

ShowModalForm method

RestoreForm method


CloseForm method

CloseForm closes the form

Use the CloseForm method to close the form.

The syntax of the CloseForm method is:

INVOKE #FormB.CloseForm

When you use the CloseForm method, the form is no longer visible, but the logic, variables, components and values remain active. When you show a form that has previously been closed using the CloseForm method, the CreateInstance and the Initialize events will not be triggered.

The CloseForm and HideForm methods are very similar, but CloseForm is more efficient for internal resource utilization.


CloseFormQuery method

CloseFormQuery closes the form after confirmation

Use the CloseFormQuery method to request that the form be closed, but only after triggering the CloseQuery event to see if the user really wants to close the form.

The syntax of the CloseFormQuery method is:

INVOKE #FormB.CloseFormQuery


ActivateForm method

Use the ActivateForm method to activate a form.

When a form is activated, it comes to the front on the desktop and focus is given to the current focus control on the form.

The syntax of the ActivateForm method is:

INVOKE #FormB.ActivateForm

The active form gets keyboard focus and its title bar and borders are highlighted. Note that if the form is minimized, it is not restored when it is activated. To make sure a form is restored when it is activated, test to see if the value of the form's WindowState is Minimized and then restore the form before activating it:

If cond'(#MForm.WindowState *eq Minimized)'
Invoke #MForm.RestoreForm
Invoke #MForm.ActivateForm
Endif

Note that to show a form, you should use the ShowForm method. The ActivateForm method is designed to bring the form to the front of all open windows.


HideForm method

Use the HideForm method to hide the form from view.

When a form is hidden, it's removed from the screen and its Visible property is set to False. The syntax of the HideForm method is:

INVOKE #FormB.HideForm


MaximizeForm method

Use the MaximizeForm method to enlarge a form window to full-screen size. The syntax of the MaximizeForm method is:

INVOKE #FormB.MaximizeForm


MinimizeForm method

Use the MinimizeForm method to minimize a form window to an icon. The syntax of the MinimizeForm method is:

INVOKE #FormB.MinimizeForm


ShowForm method

Use the ShowForm method to display a form.

If this is the first time a form is shown, this method also opens it.

The syntax of the ShowForm method is:

INVOKE #FormB.ShowForm

Note that if the form's WindowState is Minimized, the ShowForm method will not restore the form. To restore the form, use the RestoreForm method.

If the form is already open, the ShowForm method will activate it, but it will not bring the form to the front of other open windows. To do this use the ActivateForm method.


ShowModalForm method

ShowModalForm method shows the form and makes it modal

Use the ShowModalForm method to display a form and to make it modal. A modal form requires the user to take some action before the focus can switch to another form. If this is the first time a form is shown, this method also opens it.

The syntax of the ShowModalForm method is:

INVOKE #FormB.ShowModalForm

See also ModalResult property of a push-button or form.


RestoreForm method

Use the RestoreForm method to restore the form's size back to what it was before the form was minimized or maximized. The syntax of the RestoreForm method is:

INVOKE #FormB.RestoreForm


Panel

Container for other components

A panel is a simple container, without border or caption, used to group other components like buttons, check boxes, and text fields. A panel can also be nested within other panels.

Panel Properties


Panel Properties

HorizontalScrollPos property

VerticalScrollPos property

HorizontalScrollInc property

VerticalScrollInc property


HorizontalScrollPos property

HorizontalScrollPos sets the position of the horizontal scroll bar

This property can be used when the HorizontalScroll property has been set to true to display a horizontal scroll bar.

The HorizontalScrollPos is used to control the scrolling position of the panel when the components on it exceed the current size of the panel. Use this property to programmatically scroll components into view which may be out of the panel's bounds.


VerticalScrollPos property

VerticalScrollPos sets the position of the vertical scroll bar

This property can be used when the VerticalScroll property has been set to true to display a vertical scroll bar.

The VerticalScrollPosition is used to control the scrolling position of the panel when the components on it exceed the current size of the panel. Use this property to programmatically scroll components into view which may be out of the panel's bounds.


HorizontalScrollInc property

HorizontalScrollInc specifies the pixel increment for horizontal scroll bar.

Use the HorizontalScrollInc property to specify the pixel increment for the horizontal scroll bar when scroll bars are visible.


VerticalScrollInc property

VerticalScrollInc specifies the pixel increment for vertical scroll bar.

Use the VerticalScrollInc property to specify the pixel increment for the vertical scroll bar when scroll bars are visible.


Graph

Data in a graph

Use a graph to display the data in one or more fields graphically.

You work with a graph the same way as with Visual LANSA lists: first you define the data to be shown by simply dragging fields into the graph, and then use SELECT and ADD_ENTRY statements to retrieve the data.

Use the GraphType property to define the type of graph to be drawn: bar, line or pie. The graph types have different styles associated with them which you can use to control the appearance of the graph.

The following code creates a pie chart using data from the SALARY field of the LANSA demonstration system (PSLMST):

DEFINE_COM CLASS(#PRIM_GRPH) NAME(#GRPH_1) GRAPHTYPE(Pie) HEIGHT(265) LEFT(32) PARENT(#COM_OWNER) TABPOSITION(1) TOP(8) WIDTH(361)

DEFINE_COM CLASS(#PRIM_GRCL) NAME(#GRCL_1) DISPLAYPOSITION(1) PARENT(#GRPH_1) SOURCE(#SALARY)
EVTROUTINE HANDLING(#GRPH_1.INITIALIZE)
SELECT FIELDS(#GRPH_1) FROM_FILE(PSLMST) WHERE('#SALARY < 19000' )
ADD_ENTRY TO_LIST(#GRPH_1)
ENDSELECT
ENDROUTINE

Graph Properties

Graph Methods


Graph Properties

AreaStyle property

BarStyle property

CurveGranularity property

CurveOrder property

CurveStyle property

GraphType property

LineStyle property

PieStyle property

ScatterStyle property

StatisticalStyle property

SurfaceStyle property

ValueAt Property

XCaption property

YCaption property


GraphType property

GraphType sets the type of graph.

Change this property to display your data in different types of graphs. The available graph types are:

Area

Bar

Line

Pie

Scatter

Surface

Area charts display the sum of plotted values as well as the relationship of the parts to the whole. The data points are joined by a line and the area between the line and the axes is filled in. The area can be divided into into smaller areas that show the proportional size of the items that make up the area. As an example, an area chart could be used to view the progress of sales figures over time together with the relative contributions of different departments to the overall figure.

Bar charts show data as bars. They are used to illustrate comparisons among individual items. Bar charts can display one label column and multiple data columns.

Line graphs show data points joined by a line. Functionally they are similar to bar charts.

Pie charts display the data from a single column as slices of a pie. The slices show the proportional size of the items to the whole. It is the only graph type that can show only a single data field. A pie chart could be used, for example, to show the percentage of total sales earned by individual departments.

Surface charts show the result of combining two data columns as a three dimensional surface. These charts are used to find optimum combinations of two sets of data.

Scatter graphs display relationships between pairs of data columns. Columns with an odd numbered DisplayPosition is plotted on the X axis and columns with even numbered DisplayPosition are plotted on the Y axis as clusters of data. Scatter graphs are commonly used for scientific data, for example to compare predicted and actual values.

Note that the different types of graphs have specific settings associated with them. To change the appearance of, for instance, a bar chart, use the BarStyle property.


XCaption property

XCaption sets the title on the bottom of the graph

Use the XCaption property to set the title on the bottom of the graph.


YCaption property

YCaption sets the vertical title to the left of the graph

Use the YCaption property to set the title to the left of the graph.


CurveStyle property

CurveStyle controls the type of curve

This property controls the type of curve displayed (Variable-order, polynomial, Logarithmic, exponential, etc).


CurveOrder property

For variable-order polynomial curves a value of 1 produces a straight line (same as best fit); a value 1 less than the number of points produces a curve that passes through all points.

For moving average mid and end curves, the value is the range of data points over which moving averages are averaged beginning with the first point.

For all other curve types, this property is ignored.


CurveGranularity property

CurveGranularity controls the number of steps making up a curve

For all curve types except moving average, the CurveGranularity property controls the number of steps or straight lines making up the curve. The higher the number, the smoother the curve. The default is 50.


StatisticalStyle property

StatisticalStyle indicates the type of curve

The StatisticalStyle property indicates the type of statistical line or curve to be drawn: mean, min/max or standard deviation.


AreaStyle property

AreaStyle sets the style of an Area type graph

Use the AreaStyle list of properties to set the style of a area style graph. In the AreaStyle dropdown list you can select multiple settings:

NoLabels: Select this setting to hide the labels on both the X and the Y axis of the chart.

XGrid: Select this setting to display horizontal grid lines in the chart.

YGrid: Select this setting to display vertical grid lines in the chart.

SymbolColor: Select this setting to make the legend text the same as the symbol.


BarStyle property

BarStyle sets the style of a Bar style graph

Use the BarStyle list of properties to set the style of a Bar style graph. In the BarStyle dropdown list you can select multiple settings:

3D: Select this setting to make the chart look three-dimensional.

Horizontal: Select this setting to display the bars in a bar chart horizontally.

NoLabels: Select this setting to hide the labels on both the X and the Y axis of a bar chart.

Stacked: Select this setting to draw a stacked chart. A stacked chart shows the relationship of individual items to the whole. For example if you are using two fields to draw a graph, #SALES96 and #SALES97, and your file is keyed by #SALESPERSON, a stacked graph will show one bar per salesperson. This bar will consist of two parts, one representing #SALES96 and one representing #SALES97, stacked on top of each other.

StackedPercentile: Select this setting to draw a stacked percentile chart. A stacked percentile chart shows the relationship of individual items to the whole as a percentage. If you changed the style of the above example to StackedPercentile, the the two parts of the bar would show their relative sizes as a percentage.

XGrid: Select this setting to display horizontal grid lines in a bar chart.

YGrid: Select this setting to display vertical grid lines in a bar chart.

To clear all style settings, set this property to Default. To do this programmatically, you would use the following syntax:

SET #GRAPH2 BARSTYLE(DEFAULT)


LineStyle property

LineStyle sets the style of a Line graph

Use the LineStyle list of properties to set the style of a line style graph. In the LineStyle dropdown list you can select multiple settings:

NoLabels: Select this setting to hide the labels on both axes of the chart.

Stick: Select this setting to draw vertical lines from data points to the X axis.

XGrid: Select this setting to display horizontal grid lines in the chart.

YGrid: Select this setting to display vertical grid lines in the chart.

To clear all style settings, set this property to Default. To do this programmatically, you would use the following syntax:

SET #GRAPH2 LINESTYLE(DEFAULT)


PieStyle property

PieStyle sets the style of a Pie graph

Use the PieStyle list of properties to set the style of a pie style graph. In the PieStyle dropdown list you can select multiple settings:

3D: Select this setting to make the chart look three-dimensional.

AutoArrangeLabels: Select this setting to arrange labels so that they do not overlap.

Exploded: Select this setting to move all the segments of a pie chart slightly away from the center of the pie.

NoLabels: Select this setting to hide the labels of the different sections in the pie chart.

PerCent: Select this setting to make the labels a percentage of the total, not absolute magnitude.

PerCentSymbol: Select this setting to show the percent (%) symbol in the pie chart labels.

To clear all style settings, set this property to Default. To do this programmatically, you would use the following syntax:

SET #GRAPH2 PIESTYLE(DEFAULT)


ScatterStyle property

ScatterStyle sets the style of a Scatter graph

Use the ScatterStyle list of properties to set the style of a scatter style graph. In the ScatterStyle dropdown list you can select multiple settings:

Curve: Select this setting to draw a curve through each data set.

NoLabels: Select this setting to hide the labels on both the X and the Y axis of the chart.

Pattern: Uses a patterned line for curves if the Curves setting has been selected.

Solid: Joins data points with solid line.

Stick: Draws vertical lines from data point to X axis.

SymbolColor: Select this setting to make the legend text the same as the symbol.

SymbolAtPoints: Select this setting to draw a symbol at each point. The actual symbol drawn ( which can include diamonds, squares, circles or boxes ) is a property of each Graph Column.

SymbolThick: Select this setting to use a thick line for curves if the Curves setting has been selected.

XGrid: Select this setting to display horizontal grid lines in the chart.

YGrid: Select this setting to display vertical grid lines in the chart.

To clear all style settings, set this property to Default. To do this programmatically, you would use the following syntax:

SET #GRAPH2 SCATTERSTYLE(DEFAULT)


SurfaceStyle property

SurfaceStyle sets the style of a surface graph

Use the SurfaceStyle list of properties to set the style of a surface style graph. In the SurfaceStyle dropdown list you can select multiple settings:

ConnectLines: Select this setting to connect lines only without filling the surface.

ConnectLinesInBlack: Select this setting to draw the connect lines in black.

NoLabels: Select this setting to hide the labels on both the X and the Y axis of the chart.

SolidSideWalls: Select this setting to draw solid side walls.

XGrid: Select this setting to display horizontal grid lines in the chart.

YGrid: Select this setting to display vertical grid lines in the chart.

To clear all style settings, set this property to Default. To do this programmatically, you would use the following syntax:

SET #GRAPH2 SURFACESTYLE(DEFAULT)


ValueAt Property

Access the value of a Graph cell using Row and Column indices.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

COLUMN

Integer index of Column to be accessed.

Example

#OutputValue := #Graph1.ValueAt( 2 3 )


Graph Methods

SetValue Method


SetValue Method

Set the value of a Graph cell.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

COLUMN

Integer index of Column to be set.

VALUE

Value to be set.

Example

If (#graph1.SetValue ( 2 1 "abc" ) <> True)

#OutputValue1 := "invalid value for graph"

Endif


Basic List

This should not be displayed. The basic list exists only to act as a single source for list-related help item.

Basic List Properties

Basic List Events

Basic List Methods


Basic List Properties

Appearance property

Columns property

ColumnEllipses property

ColumnHeaders property

ColumnScroll property

FullRowSelect property

Items property

CurrentItem property

Entries property

FocusItem property

Messages property

Modified property

KeyboardPositioning property

ModifiedRules property

NotificationStyle property

ShowItemHint property

ShowSelectionHilight property

ShowSelection property

SelectionStyle property

UsePicklist property

ColumnResize property

DragColumns property

EditorSizing property

PrompterTabStop property

View Pop-up Menu property

ViewStyle property

Value parameter Event

PrompterPosition property

PrompterImage property

ShowPrompter property


Appearance property

Appearance sets the appearance of the list or grid

Use the Appearance property to specify whether the list or grid is displayed with 3D effects (Default) or without them (Flat).


Columns property

Columns gives you access to the properties of the columns

A run-time only property.

Use the Columns property to get access to the properties of the columns in a list, grid or a tree view.

Columns represents a collection of all the columns in a list: for example to access the properties of the first column refer to it as Columns.

These statements retrieve the DisplayPosition and Width of the first column in a list view:

Set Com(#std_num) Value(#ltvw_1.columns.displayposition)

Set Com(#std_num_1) Value(#ltvw_1.columns.width)

Recording column attributes is useful when you want to restore them later. The following code iterates through the columns in a list using a For/Endfor loop and retrieves their DisplayPosition and Width attributes into a grid. You can copy and paste this code.

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('For/Endfor') Height(317) Left(300) Top(128) Width(397)
Define_Com Class(#PRIM_LTVW) Name(#LTVW_1) Displayposition(1) Fullrowselect(True) Height(145) Left(16) Parent(#COM_OWNER) Showalternatecolor(True) Showsortarrow(True) Tabposition(1) Top(24) Width(353)
Define_Com Class(#PRIM_GRID) Name(#GRID_1) Captionnoblanklines(True) Columnbuttonheight(19) Displayposition(2) Height(81) Left(200) Parent(#COM_OWNER) Rowheight(14) Showbuttonselection(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(2) Top(184) Width(168)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_1) Displayposition(1) Parent(#LTVW_1) Source(#EMPNO) Width(20)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_2) Displayposition(2) Parent(#LTVW_1) Source(#SURNAME) Width(40)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_3) Displayposition(3) Parent(#LTVW_1) Source(#GIVENAME) Width(20) Widthtype(Remainder)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_1) Caption('DisplayPosition') Captiontype(Caption) Displayposition(1) Parent(#GRID_1) Source(#STD_NUM) Width(20) Widthtype(Remainder)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_2) Caption('Width') Captiontype(Caption) Displayposition(2) Parent(#GRID_1) Source(#STD_AMNT) Width(50)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Get Column Attributes') Displayposition(3) Left(16) Parent(#COM_OWNER) Tabposition(3) Top(184) Width(121)
Define_Com Class(#STD_NUM) Name(#STD_NUM)
Define_Com Class(#STD_AMNT) Name(#STD_AMNT)
Evtroutine Handling(#com_owner.Initialize)
Select Fields(#LTVW_1) From_File(PSLMST)
Add_Entry To_List(#LTVW_1)
Endselect
Endroutine
Evtroutine Handling(#PHBN_1.Click)
For Each(#Current) In(#ltvw_1.Columns)
Set Com(#std_num) Value(#current.displayposition)
Set Com(#std_amnt) Value(#current.width)
Add_Entry To_List(#GRID_1)
Endfor
Endroutine
End_Com


ColumnEllipses property

Use the ColumnEllipses property to control how the text in a column header is truncated if it does not fit. This property can have these values:

None: The text is truncated.

End: If the end of a string does not fit in the column, it is truncated and ellipses are added.


ColumnHeaders property

ColumnHeaders sets column headers on and off

Use the ColumnHeaders property to show or hide column headers.

For list views, this property only applies to ViewStyle Report.


ColumnScroll property

ColumnScroll controls horizontal scrolling

Use the ColumnScroll property to control horizontal scrolling. When this property is True, the control is scrolled column by column. When the property is False, the control is scrolled by pixel.


FullRowSelect property

FullRowSelect sets full row selection to on or off.

Use the FullRowSelect property to control whether the control supports full row selection (selection from any column in the row, not just the first column).


Items property

Items property gives you access the attributes of items in the component

A run-time only property.

Use the Items property to get access to the properties of the items in lists, grids, tree views, combo boxes, property sheets or menus.

Items represents a collection of all the items in the component: for example to access the properties of the first item refer to it as Items.

This statement disables the first menu item in a submenu:

Set Com(#smnu_1.items) Enabled(False)

You can use a For/EndFor loop to access the properties of all items in a component. In this example clicking button #PHBN_1 disables all items in submenu #SMNU_1 and clicking #PHBN_2 enables them.

Evtroutine Handling(#PHBN_1.Click)

For Each(#Current) In(#smnu_1.Items)
Set Com(#Current) Enabled(False)
Endfor
Endroutine
Evtroutine Handling(#PHBN_2.Click)
For Each(#Current) In(#smnu_1.Items)
Set Com(#Current) Enabled(True)
Endfor
Endroutine


CurrentItem property

CurrentItem is the item being worked with.

It is only valid at run-time.

The CurrentItem is the item in a list box, list view, combo box, grid or property sheet which is currently being worked with in your application. CurrentItem can be set by the user by moving the focus on the item (in which case it is the same as FocusItem) or it can be set by the program in a GET_ENTRY or SELECTLIST command.

The value of the current item is used, for example, as the key in database I/O commands.

Double-click on CurrentItem in the tree on the left to see the properties, methods and events a list item has.


Entries property

Entries shows the number of entries in a list.

A run-time read-only property.

Use the Entries property to find out the number of entries in a list-type component such as for example a combo box, grid, multi-line edit box or a list box.

Note that in a multi-line edit box with AddEntryMode set to MultiplePerLine, a line can consist of several entries.


FocusItem property

FocusItem is the item in focus

Only valid at run-time.

The FocusItem is the item in a list, tree view or grid which has the focus.

Every item in a list has a Focus property which can be set to True or False. FocusItem is the item which has its Focus property set to True. Only one item at a time can have the focus.

If an item's Focus property is set to True, its Selected property is always also set to True. (Refer to CurrentItem Property.)

For a tree view items, which have additional properties, CurrentItem is useful in setting these properties for the item in focus. For example to set expand the item in focus you would write the following statement:

set com(#trvw_1.FocusItem) Expanded(True)

Double-click on FocusItem in the tree on the left to see the properties, methods and events in a list item.


Messages property

Messages is a collection of messages in the status bar

Use the Messages property to access the collection of all messages in the status bar.

This Click event code iterates through the Messages collection and adds the first level message text to a list:

Evtroutine Handling(#STbr_1.click) Options(*NOCLEARERRORS *NOCLEARMESSAGES)

For Each(#Message) In(#stbr_1.messages)
Change Field(#STD_TEXT) To('#MESSAGE.FIRSTLEVELTEXT')
Add_Entry To_List(#TRACE)
Endfor
Endroutine

Messages in the collection have properties FirstLevelText, SecondLevelText and HasSecondLevelText (True/False).


Modified property

Modified indicates if an item or a cell has changed

Use the Modified property to check if the contents of an item or a grid cell have been changed.

This property is automatically set to True when the user makes a change to the contents. The Modified flag is not set when the contents are changed programmatically.

In a grid, the Modified property of a cell is set to True when the user changes the contents of the cell. When this happens, the Modified property of the grid item and the grid itself are also set to True. Setting the grid's Modified property to False will set the Modified property of all items and cells to False. Setting the Modified property of a grid item to False sets the Modified property of all cells of the item to be False.

This event routine checks the Modified status of the current grid item and inserts changed information to a file:

evtroutine handling(#UPDATE_BUTTON.Click)

selectlist #grid_1
if cond('#grid_1.currentitem.Modified *eq TRUE')
update fields(#surname #givename) in_file(pslmst) with_key(#empno) val_error(*next)
if_status is_not(*okay)
upd_entry #grid_1
endif
endif
endselect
endroutine


KeyboardPositioning property

KeyboardPositioning sets the way the list searches for items from keyboard characters

Use the KeyboardPositioning property to specify how a list view or a tree view searches for items from keyboard characters. There are two values to choose:

  • FirstColumn specifies the text of the leftmost column should be used when matching items against entered keyboard characters.
  • SortColumn specifies the text of the primary sort column should be used when matching items against entered keyboard characters.


ModifiedRules property

Use the ModifiedRules to specify whether the Modified property should be set to True when the focus or the selection is moved to another item in a list, combo box, tree view, grid or property sheet.

By default the Modified property is set to True when the focus or selection is changed. The ModifiedRules property can be set to ignore focus changes when the focus (IgnoreFocusChanges) and/or selection (IgnoreSelectionChanges) is changed.


NotificationStyle property

NotificationStyle controls how events are triggered

By default when list, combo box, tree or grid items are worked with programmatically, no item events (such as ItemChanged, ItemGotSelection, ItemGotFocus, ItemLost focus or ItemLostSelection) are triggered. Only when the items are manipulated by the user (using the mouse or keyboard), these item events are triggered.

If you want the item events to be triggered when items are worked with programmatically, set the NotificationStyle of the control to Program. In this way the same events are triggered regardless of whether the items are manipulated by a program or by a user.

Copy and paste this example application to see how a tree view item is selected programmatically:

FUNCTION OPTIONS(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Height(306) Left(333) Top(142) Width(521)
Define_Com Class(#PRIM_TRVW) Name(#TRVW_1) Componentversion(1) Displayposition(2) Height(222) Left(8) Notificationstyle(Program) Parent(#COM_OWNER) Tabposition(2) Top(0) Width(495)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_1) Level(1) Parent(#TRVW_1) Source(#DEPTMENT) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_2) Displayposition(1) Keyposition(1) Level(1) Parent(#TRVW_1) Source(#DEPTDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_3) Displayposition(1) Keyposition(1) Level(2) Parent(#TRVW_1) Source(#FULLNAME)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Click Here to programatically trigger an ItemGotSelection event') Displayposition(1) Height(33) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(240) Width(492)
EVTROUTINE handling(#com_owner.Initialize)
SET #com_owner caption(*component_desc)
select *all deptab
SELECT FIELDS(#SURNAME #GIVENAME) FROM_FILE(PSLMST1) WITH_KEY(#DEPTMENT)
use bconcat with_args(#givename #surname) to_get(#fullname)
add_entry #trvw_1
endselect
endselect
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_1.Click)
selectlist #trvw_1
IF COND('#fullname = ''VERONICA BROWN''')
set #trvw_1.CurrentItem selected(True)
leave
endif
endselect
ENDROUTINE
EVTROUTINE HANDLING(#TRVW_1.ItemGotSelection) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
USE BUILTIN(MESSAGE_BOX_SHOW) WITH_ARGS(OK OK INFORMATION *blanks 'ItemGotSelection event fired')
set #trvw_1.CurrentItem ensurevisible(true)
ENDROUTINE
END_COM


ShowItemHint property

ShowItemHint turns items' hints on or off

Use the ShowItemHint property to control whether the hints of the items are shown. The text for the hints is specified using the Caption parameter of the ItemHintText event.


ShowSelectionHilight property

ShowSelectionHilight controls how selected items are shown

Use the ShowSelectionHilight property to set the dark blue highlighting of a selection on or off. When the highlighting is set to False, the selection is shown as gray.


ShowSelection property

ShowSelection shows or hides selection

ShowSelection controls whether a selection is shown in a control when it does not have focus.

Set this property to True to show the selection when the control is not selected.


SelectionStyle property

SelectionStyle can be Single, Multiple or Extended.

Use the SelectionStyle property to set the way items can be selected.

If the selection style is Single, the user can only select one item at a time.

If the selection style is Multiple, the user can select several items.

If the selection style is Extended, the user can select a block of entries. Note that this selection style is not supported in all lists.

In a grid the selection style can be WholeRow. This style selects an entire row at a time.


UsePicklist property

UsePicklist controls whether a picklist is used

Use the UsePicklist property to control whether a picklist visualization is used for a column if the field has a picklist visualization.

If you set this property to False, the column is displayed as a normal column.


ColumnResize property

Use the ColumnResize property to control whether the size of the columns can be adjusted.


DragColumns property

Use the DragColumns property to control whether the user can change the position of columns by dragging with the mouse.

When this property is set to True, the user can change the relative position of the columns.


EditorSizing property

Use the EditorSizing property to specify how a reusable part used as the EditorPart is displayed.

When the value of this property is Default, the reusable part is displayed within the row and column height of the grid.

When the value of this property is Editor, the reusable part is displayed in its original size, regardless of the row and column height of the grid.


PrompterTabStop property

Use the PrompterTabStop property to enable or disable a tab stop on the prompter button.

To enable your users to access the prompter button from the keyboard, set this property to True.

This property takes effect only when the TabStop and ShowPrompter properties are set to True.


View Pop-up Menu property

ViewpopupMenu specifies the pop-up menu for the view area

Use the ViewpopupMenu to display a context-sensitive pop-up menu when the user right-clicks the view area of a control.

The view area is the "white space" not used by list items and, in case of list view control, also the column header area to the right of the rightmost column which appears as a grey column header button.


ViewStyle property

ViewStyle sets the way the list or tree is shown

Use the ViewStyle property to specify how a list view or a tree view is to be displayed. There are four views to choose from in a list view:

  • Icon style shows the items with large icons.
  • Smallicon style shows the list items preceded by a small icon (16 x 16 pixels)
  • List style is otherwise the same as SmallIcon but the items are all placed on a line of its own.
  • Report style shows the list items in a list with a column header.

The view style of a tree view can be either Levelled or UnLevelled.

A typical tree view is Levelled.

An unlevelled tree can have several columns of data with column headers (in effect it is a combination of a tree and a list view). Unlevelled tree views are used extensively in the LANSA editor (for example Field tree view in File maintenance).

The following example form shows how unlevelled tree views are created. To use it, you must have a Full RDMLX enabled form:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(471) Clientwidth(473) Height(505) Layoutmanager(#ATLM_1) Left(79) Top(111) Width(481)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_TRVW) Name(#TRVW_1) Columnbuttonheight(18) Componentversion(1) Displayposition(1) Fullrowselect(True) Height(471) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Viewstyle(UnLevelled) Width(473)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#TRVW_1) Parent(#ATLM_1)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_1) Caption('Name') Captiontype(Caption) Displayposition(1) Level(1) Parent(#TRVW_1) Source(#STD_NAME) Width(32)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_2) Caption('Description') Captiontype(Caption) Displayposition(2) Level(2) Parent(#TRVW_1) Source(#STD_DESCL) Width(45) Widthtype(Remainder)
Evtroutine Handling(#com_owner.CreateInstance)
Set Com(#com_owner) Caption(*component_desc)
#Com_owner.Load_tree
Endroutine
Mthroutine Name(Load_tree)
#Com_owner.Add_departments
Endroutine
Mthroutine Name(Add_Departments)
Define_Com Class(#prim_tvit) Name(#Department_item) Reference(*dynamic)
Select Fields(#deptment #deptdesc) From_File(deptab)
#com_owner.Add_Entry Column_1(#Deptment) Column_2(#Deptdesc) Tree_Item(#Department_item) Item_Icon(#vi_deptcl)
#Com_Owner.Add_Sections( #deptment #department_item )
Endselect
Endroutine
Mthroutine Name(Add_Sections)
Define_Map For(*Input) Class(#deptment) Name(#Department)
Define_Map For(*Input) Class(#prim_tvit) Name(#Parent_item) Mandatory(*null) Pass(*by_reference)
Define_Com Class(#prim_tvit) Name(#Section_item) Reference(*dynamic)
Select Fields(#section #secdesc) From_File(sectab) With_Key(#department)
#com_owner.Add_Entry Column_1(#section) Column_2(#secdesc) Parent_Item(#parent_item) Tree_Item(#Section_item) Item_Icon(#vi_sectcl)
#com_owner.Add_employees( #Department #section #Section_item )
#trvw_1.currentitem.MarginBottom := 5
Endselect
#section_item.marginbottom := 5
Endroutine
Mthroutine Name(Add_Employees)
Define_Map For(*Input) Class(#deptment) Name(#Employee_Department)
Define_Map For(*Input) Class(#Section) Name(#Employee_Section)
Define_Map For(*Input) Class(#prim_tvit) Name(#Parent_item) Mandatory(*null) Pass(*by_reference)
Select Fields(#Empno #Givename #surname) From_File(pslmst1) With_Key(#Employee_department #Employee_section)
#com_owner.Add_Entry Column_1(#Empno) Column_2(#Givename.trim + ', ' + #Surname.trim) Parent_Item(#parent_item) Item_Icon(#vi_employ)
Endselect
Endroutine
Mthroutine Name(Add_Entry)
Define_Map For(*Input) Class(#std_Name) Name(#column_1)
Define_Map For(*Input) Class(#std_Descl) Name(#column_2)
Define_Map For(*Input) Class(#prim_tvit) Name(#Parent_item) Mandatory(*null) Pass(*by_reference)
Define_Map For(*Input) Class(#prim_icon) Name(#Item_Icon) Mandatory(*null) Pass(*by_reference)
Define_Map For(*output) Class(#prim_tvit) Name(#Tree_item) Mandatory(*null) Pass(*by_reference)
#std_name := #Column_1
#std_Descl := #Column_2
Add_Entry To_List(#trvw_1)
#trvw_1.Currentitem.image <= #item_icon
#trvw_1.Currentitem.parentitem <= #parent_item
#tree_item <= #trvw_1.currentitem
Endroutine
End_Com


Value parameter Event

The Value parameter returns the changed contents of the editor.

The value returned is a variant. You can use the variant functions to determine the type of value returned.


PrompterPosition property

The PrompterPosition sets the position of the prompter.

Use the PrompterPosition property to control where the prompter of this component is positioned.

The prompter can be positioned to the top, bottom, left or right of the component. If the value of this property is set to None, the prompter will not be displayed.

Note that you need to manually define the BEGIN_COM Role(*prompter) and associated code before the prompter is available.


PrompterImage property

PrompterImage sets the image for the promp button

Use the PrompterImage property to change the default prompt image to a different bitmap.


ShowPrompter property

ShowPrompter turns the display of prompter on or off.

Use the ShowPrompter property to control whether a prompter for this field is displayed. The value for this property can be True or False.

The prompter is a user-defined form. When the field has a prompter, a button with ellipses is added to the entry field so the user can display the prompter. At run-time when the prompter button is clicked, the prompter component is displayed to allow the user to choose a value.

Note that you need to manually define the BEGIN_COM Role(*prompter) and associated code before the prompter is available.

For example:

Begin_Com Role(*prompter #qap100) Name(#PROMPTER) Defaultprompter(True)

End_Com

For more information about prompters, refer to Prompter Classes in Field Class list in the Developer Guide.


Basic List Events

ItemGotFocus event

ItemGotFocusAccept event

ItemChangedAccept event

ItemHintText event

ItemLostFocus event

ItemGotSelection event

ItemGotSelectionAccept event

ItemLostFocusAccept event

ItemLostSelection event

ItemLostSelectionAccept event

ItemChanged event

ViewDoubleClick event


ItemGotFocus event

The ItemGotFocus event is triggered when an item gets focus. Typically this happens when the user clicks on an item. For a list-type component, this event sets the run-time property FocusItem.


ItemGotFocusAccept event

The ItemGotFocusAccept event is triggered when an item gets focus. Typically this happens when the user clicks on an item.

The ItemGotFocusAccept event differs from the ItemGotFocus event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus and ItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the program more control over what the user does. Whenever something is about to change the program can control whether or not to accept the change before the operation continues.

Accept Parameter

Reason Parameter

Continue Parameter

Value parameter


ItemChangedAccept event

The ItemChangedAccept event is triggered when an item is about to be changed.

The ItemChangedAccept event gives the program control whether to accept a change that is about to be made prior to the change happening. The processing is broken down into two parts: accept and commit. If the change is not accepted, the change will not happen.

The most likely use of this feature will be the following case:

  • User enters invalid data.
  • ItemChangedAccept event is fired.
  • The program displays a message box in the event to ask the user if the entered data is valid.
  • If the data is invalid then Continue is set to False and focus stays on the edit so that the user can re-enter the data.

A typical use of the ItemChangedAccept event could be that the user enters the value 000000 in an editable column of field #EMPNO and then changes the selection by clicking elsewhere on the grid, which causes the ItemChangedAccept event to be fired asking if the value entered is to be accepted. After this:

  • The value can be accepted (the Accept parameter is set to True).
  • The value can be not accepted (the Accept parameter is set to False).
  • The operation can be allowed to continue (the Continue parameter is set to True). The item clicked will be selected.
  • The operation can be stopped (the Continue parameter is set to False). The item clicked will not be selected and focus will stay with the current edit.

The following sample application demonstrates the use of ItemChangedAccept processing. You can copy and paste this code. You need the demonstration file PSLMST to run the example:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Accept Processing Example') Formposition(ScreenCenter) Height(434) Left(308) Top(119) Width(568)
* Grid Definition
Define_Com Class(#PRIM_GRID) Name(#LIST) Columnbuttonheight(33) Displayposition(2) Height(241) Left(8) Parent(#COM_OWNER) Showselection(True) Tabposition(2) Top(8) Visualstyle(#VS_NORM) Width(545)
Define_Com Class(#PRIM_GDCL) Name(#COL1) Displayposition(1) Parent(#LIST) Source(#STD_NUM) Width(18)
Define_Com Class(#PRIM_GDCL) Name(#COL2) Displayposition(2) Parent(#LIST) Readonly(False) Source(#EMPNO) Width(20)
Define_Com Class(#PRIM_GDCL) Name(#COL3) Displayposition(3) Parent(#LIST) Readonly(False) Source(#ADDRESS1) Width(34)
Define_Com Class(#PRIM_GDCL) Name(#COL4) Displayposition(4) Parent(#LIST) Readonly(False) Source(#SALARY) Width(28)
* The rest....
Define_Com Class(#PRIM_GPBX) Name(#GPBX_7) Caption('Edit Events') Displayposition(1) Height(118) Left(8) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(264) Width(201)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_ACCEPT) Buttonstate(Checked) Caption('Accept Value') Displayposition(1) Left(16) Parent(#GPBX_7) Tabposition(1) Top(19) Width(161)
Define_Com Class(#STD_NUM) Name(#STD_NUM)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_CONTINUE) Buttonstate(Checked) Caption('Continue') Displayposition(2) Left(16) Parent(#GPBX_7) Tabposition(2) Top(48)
Define_Com Class(#PRIM_VAR) Name(#NEW_VALUE)
Define_Com Class(#PRIM_STBR) Name(#STBR_1) Displayposition(3) Height(24) Left(0) Messageposition(1) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(383) Width(560)
* ===========================================================================================
*
* Form Operations
*
* ===========================================================================================
Evtroutine Handling(#COM_OWNER.Initialize) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
* Populate grid
Select Fields(*ALL) From_File(PSLMST)
Add_Entry To_List(#LIST)
Endselect
Endroutine
* ===========================================================================================
*
* Grid Accept Event Testing
*
* ===========================================================================================
Evtroutine Handling(#LIST.ItemChangedAccept) Accept(#ACCEPT) Continue(#CONTINUE) Value(#NEW)
Set Com(#NEW_VALUE) Value(#NEW)
Use Builtin(BCONCAT) With_Args('Accept value of' #NEW_VALUE.STRING '?') To_Get(#STD_TEXT)
Message Msgid(DCM9993) Msgf(DC@M01) Msgdta(#STD_TEXT)
If Cond('#CKBX_ACCEPT.ButtonState = unChecked')
Set Com(#ACCEPT) Value(false)
Endif
If Cond('#CKBX_CONTINUE.ButtonState = unChecked')
Set Com(#CONTINUE) Value(false)
Endif
Endroutine
End_Com

Parameters

Accept Parameter

Reason Parameter

Continue Parameter

Value parameter


Accept Parameter

Set the Accept parameter to True to proceed with the event or set it to false to cancel the Event.


Reason Parameter

The Reason parameter indicates why the event has been triggered.

The Reason can be:

  • LeaveControl
  • ResetContent
  • ChangeSelection
  • CommitPendingChanges
  • ChangeChecked (the selection of a check box in a list view or tree view is changed)


Continue Parameter

Set the Continue parameter to True to proceed with the operation that caused the event.

Note that only some operations are cancellable. For example CommitPendingChanges and LeaveControl are not cancellable, but ChangeSelection is.


Value parameter

The Value parameter returns the value which has just been changed. Use this parameter to validate the changed value before the value of the underlying field is changed.

The value returned is a variant. You can use the variant functions to determine the type of value returned.


ItemHintText event

ItemHintText happens when text is fetched for the hint

The ItemHintText event is triggered when text is fetched for the hint of an item. This happens after a short delay when the cursor is moved over the item.

Provide the text for the hint by assigning a value for its Caption parameter.

The following example concatenates text in list columns and shows them in an item's hint. You can copy and paste this example into a form.

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Height(395) Left(402) Top(108) Width(411)
Define_Com Class(#PRIM_LTVW) Name(#LISTVIEW) Displayposition(1) Fullrowselect(True) Height(337) Left(24) Parent(#COM_OWNER) Showitemhint(True) Tabposition(1) Top(8) Width(353)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_1) Displayposition(1) Parent(#LISTVIEW) Source(#EMPNO) Width(18)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_2) Displayposition(2) Parent(#LISTVIEW) Source(#ADDRESS1) Width(48)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_3) Displayposition(3) Parent(#LISTVIEW) Source(#POSTCODE) Width(20) Widthtype(Remainder)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_4) Parent(#LISTVIEW) Source(#SURNAME) Visible(False) Width(20)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_5) Parent(#LISTVIEW) Source(#GIVENAME) Visible(False) Width(20)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_6) Parent(#LISTVIEW) Source(#PHONEBUS) Visible(False) Width(20)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_7) Parent(#LISTVIEW) Source(#ADDRESS2) Visible(False) Width(20)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_8) Parent(#LISTVIEW) Source(#ADDRESS3) Visible(False) Width(20)
Evtroutine Handling(#COM_OWNER.Initialize) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Select Fields(*ALL) From_File(PSLMST)
Add_Entry To_List(#LISTVIEW)
Endselect
Endroutine
Evtroutine Handling(#LISTVIEW.ItemHintText) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Caption(#UseCaption)
Use Builtin(BCONCAT) With_Args('This employee is named' #GIVENAME #SURNAME 'and has phone number' #PHONEBUS) To_Get(#SYSVAR$AV)
Use Builtin(BCONCAT) With_Args(#SYSVAR$AV 'and lives at' #ADDRESS1 #ADDRESS2 #ADDRESS3) To_Get(#SYSVAR$AV)
Set Com(#UseCaption) Value(#SysVar$av)
Endroutine
End_Com


ItemLostFocus event

ItemLostFocus happens when another item gets focus

The ItemLostFocus event is triggered when an item loses focus. Typically this happens when the user clicks on another item.


ItemGotSelection event

The ItemGotSelection event happens when an item is selected.

If the component being used does not support selection of multiple items, the item receiving the selection becomes the CurrentItem immediately after this event.

In components which support multiselect, this event sets the item's Selected property to True. The item which receives the focus becomes the CurrentItem.

In a graph component this event is triggered when the user clicks a data item such as a pie segment or a bar of a bar chart.


ItemGotSelectionAccept event

The ItemGotSelectionAccept event is triggered when an item is selected.

The ItemGotSelectionAccept event differs from the ItemGotSelection event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the program more control over what the user does. Whenever something is about to change the program can control whether or not to accept the change before the operation continues.


ItemLostFocusAccept event

The ItemLostFocusAccept event is triggered when an item loses focus.

The ItemLostFocusAccept event differs from the ItemLostFocus event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the program more control over what the user does. Whenever something is about to change the program can control whether or not to accept the change before the operation continues.


ItemLostSelection event

The ItemLostSelection event happens when an item is no longer selected.


ItemLostSelectionAccept event

The ItemLostSelectionAccept event is triggered when an item loses focus.

The ItemLostSelectionAccept event differs from the ItemLostSelection event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the program more control over what the user does. Whenever something is about to change the program can control whether or not to accept the change before the operation continues.


ItemChanged event

ItemChanged happens when an item is changed

The ItemChanged event is triggered when the text of a tree view, list view or grid item is modified.


ViewDoubleClick event

ViewDoubleClick occurs when the user double-clicks the view area

ViewDoubleClick occurs when the user double-clicks the view area of control.

The view area is the "white space" not used by list items and, in case of list view control, also the column header area to the right of the rightmost column which appears as a grey column header button.

Wherever ViewDoubleClick event occurs the DoubleClick event does not occur.

In the Explorer component ViewDoubleClick does not apply if the display style is FileListBox or DirectoryListBox.

You can copy and paste the following example to see the different click events in the Explorer:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(539) Clientwidth(663) Height(566) Left(340) Top(146) Width(671)
Define_Com Class(#PRIM_DCBX) Name(#DCBX_1) Displayposition(1) Fileincludemask('"*.*"') Filename('Desktop') Height(337) Left(8) Notifycomponent(#DCBX_2) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(8) Width(289)
Define_Com Class(#PRIM_DCBX) Name(#DCBX_2) Displayposition(2) Displaystyle(GeneralListView) Fileincludemask('"*.*"') Filename('Desktop') Height(338) Left(312) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(7) Width(296)
Define_Com Class(#STD_TEXT.Visual) Name(#FILENAME) Caption('FileName') Displayposition(4) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(4) Top(351) Usepicklist(False) Width(555)
Define_Com Class(#STD_TEXT.Visual) Name(#PATH) Caption('Path') Displayposition(6) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(6) Top(376) Usepicklist(False) Width(555)
Define_Com Class(#STD_TEXT.Visual) Name(#PATHTYPE) Caption('Pathtype') Displayposition(8) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(8) Top(399) Usepicklist(False) Width(555)
Define_Com Class(#STD_TEXT.Visual) Name(#FILENAME1) Caption('FileName Before dbl clk applied') Displayposition(3) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(3) Top(432) Usepicklist(False) Width(555)
Define_Com Class(#STD_TEXT.Visual) Name(#PATH1) Caption('Path Before dbl clk applied') Displayposition(5) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(5) Top(456) Usepicklist(False) Width(555)
Define_Com Class(#STD_TEXT.Visual) Name(#PATHTYPE1) Caption('Pathtype before dbl clk applied') Displayposition(7) Height(19) Labeltype(Caption) Left(8) Parent(#COM_OWNER) Tabposition(7) Top(488) Usepicklist(False) Width(555)
Define_Com Class(#PRIM_STBR) Name(#STBR_1) Displayposition(9) Height(24) Left(0) Messageposition(1) Parent(#COM_OWNER) Tabposition(9) Tabstop(False) Top(515) Width(663)
Evtroutine Handling(#com_owner.Initialize)
Set Com(#com_owner) Caption(*component_desc)
Endroutine
Evtroutine Handling(#DCBX_2.ItemGotSelection) Path(#w_path) Name(#w_filename) Pathtype(#w_pathtype)
Set Com(#FILENAME) Value(#W_FILENAME)
Set Com(#PATH) Value(#W_PATH)
Set Com(#PATHTYPE) Value(#W_PATHTYPE)
Message Msgtxt('Item clicked in Right Explorer Component')
Endroutine
Evtroutine Handling(#DCBX_1.ItemGotSelection) Path(#w_path) Name(#w_filename) Pathtype(#w_pathtype)
Set Com(#FILENAME) Value(#W_FILENAME)
Set Com(#PATH) Value(#W_PATH)
Set Com(#PATHTYPE) Value(#W_PATHTYPE)
Message Msgtxt('Item clicked in Left Explorer Component')
Endroutine
Evtroutine Handling(#DCBX_2.ViewDoubleClick)
Set Com(#FILENAME1) Value(#DCBX_2.Filename)
Set Com(#PATH1) Value(#DCBX_2.Path)
Set Com(#PATHTYPE1) Value(#DCBX_2.PathType)
Message Msgtxt('View double clicked Right Explorer Component')
Endroutine
Evtroutine Handling(#DCBX_1.ViewDoubleClick)
Set Com(#FILENAME1) Value(#DCBX_1.Filename)
Set Com(#PATH1) Value(#DCBX_1.Path)
Set Com(#PATHTYPE1) Value(#DCBX_1.PathType)
Message Msgtxt('View double clicked Left Explorer Component')
Endroutine
Evtroutine Handling(#DCBX_2.ItemDoubleClick)
Set Com(#FILENAME1) Value(#DCBX_2.Filename)
Set Com(#PATH1) Value(#DCBX_2.Path)
Set Com(#PATHTYPE1) Value(#DCBX_2.PathType)
Message Msgtxt('Double clicked Right Explorer Component')
Endroutine
Evtroutine Handling(#DCBX_1.ItemDoubleClick)
Set Com(#FILENAME1) Value(#DCBX_1.Filename)
Set Com(#PATH1) Value(#DCBX_1.Path)
Set Com(#PATHTYPE1) Value(#DCBX_1.PathType)
Message Msgtxt('Double clicked Left Explorer Component')
Endroutine
End_Com


Basic List Methods

StartEdit method

SizeToContents method

FindItem method

OnItemGotReference Method

OnSort Method


StartEdit method

StartEdit method is a programmatic way of starting the edit of the current item

Use the StartEdit method to start programmatically the edit of the current item in the component.


SizeToContents method

Use the SizeToContents method to resize the width of the column to the maximum width of its contents (same as if you had of doube-clicked on the column border).

This method only applies to unlevelled tree views.


FindItem method

An advanced method.

The FindItem method is used to find an item in the tree from its related reference. Its purpose is to efficiently retrieve a tree view item.

Also see

RelatedReference property for tree item.

StartItem parameter

Result parameter

RelatedReference parameter


StartItem parameter

Use the StartItem parameter to optionally specify the first item to be searched.


Result parameter

The Result parameter returns the result of the FindItem method.


RelatedReference parameter

Use the RelatedReference parameter to specify the related reference for the item. This parameter is mandatory.


OnItemGotReference Method

Executed whenever a data object instance is assigned to the item via the RelatedReference property.

This provides a simple means by which a data object and list item can be joined together, and then used to provide the values shown in the design.


OnSort Method

Executed whenever the item is referred to in the sort process.

Sorting in Tree and Tile is entirely user defined and it is therefore necessary to supply the Key (the 'value' that is being sorted) and the Order to the sort routine. This information is then passed to the OnSort method.

The example supports 3 different sorts – EMPNO, SURNAME and GIVENAME. These values are entirely arbitrary, but for simplicity they match with specific field names. The sorting here is only ever Ascending.

In each case, the local variable value is compared to equivalent variable value, in this case published as a property of the design instance, to determine whether each value is less then, equal to , or greater than the other.

The OnSort method may be called many times for each item as the sort process evaluates each of the items.

Case (#Key)
When (= EMPNO)
#Result := #Empno.Compare( (#CompareTo.Design *As #XDXPersonnelTreeEmployee).Empno )
When (= GIVENAME)
#Result := #Givename.Compare( (#CompareTo.Design *As #XDXPersonnelTreeEmployee).Givename )
When (= SURNAME)
#Result := #Surname.Compare( (#CompareTo.Design *As #XDXPersonnelTreeEmployee).Surname )
Endcase


Basic Edit

Basic Edit Properties

AutoSelect property

AutoSelect property AutoTab property

HideSelection property

HideSelection property


AutoSelect property

AutoSelect controls automatic selection of text

AutoSelect controls whether the text in the edit box is selected when the user tabs to it. If this property is set to True, the text in the edit box will be selected.


AutoTab property

AutoTab moves the cursor to the next control

Set the AutoTab property to True if you want the cursor to move to the next input field (next TabPosition) when an input field has been filled.

To see how AutoTab works, copy and paste the following code to a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) CAPTION('AutoSelectItem & AutoTab Example') HEIGHT(205) LEFT(336) TOP(158) WIDTH(462)
DEFINE_COM class(#PRIM_CKBX) name(#CKBX_AUTOTAB) CAPTION('AutoTab True') DISPLAYPOSITION(5) LEFT(296) PARENT(#COM_OWNER) TABPOSITION(6) TOP(48)
DEFINE_COM class(#EMPNO.Visual) name(#EMPNO) AUTOSELECT(False) CAPTION('Employee Number') DISPLAYPOSITION(1) HEIGHT(22) LABELTYPE(Caption) LEFT(24) MARGINLEFT(112) PARENT(#COM_OWNER) TABPOSITION(1) TOP(64) WIDTH(209)
DEFINE_COM class(#PRIM_EDIT) name(#EDIT_1) AUTOSELECT(False) DISPLAYPOSITION(3) HEIGHT(22) LEFT(136) MAXLENGTH(5) PARENT(#COM_OWNER) TABPOSITION(2) TOP(88) VALUE('0') WIDTH(155)
DEFINE_COM class(#SALARY.Visual) name(#SALARY) AUTOSELECT(False) DISPLAYPOSITION(6) HEIGHT(22) LEFT(24) MARGINLEFT(113) PARENT(#COM_OWNER) TABPOSITION(3) TOP(112) WIDTH(273)
DEFINE_COM class(#PRIM_SPDT) name(#SPDT_1) DISPLAYPOSITION(7) HEIGHT(22) LEFT(136) PARENT(#COM_OWNER) TABPOSITION(4) TOP(136)
DEFINE_COM class(#PRIM_LABL) name(#LABL_1) CAPTION('Edit Box:') DISPLAYPOSITION(2) HEIGHT(19) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(7) TABSTOP(False) TOP(88) WIDTH(88)
DEFINE_COM class(#PRIM_LABL) name(#LABL_2) CAPTION('Spin Edit Box:') DISPLAYPOSITION(4) HEIGHT(25) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(136) WIDTH(97)
DEFINE_COM class(#PRIM_LABL) name(#LABL_3) CAPTION('When AutoTab is set to true and you reach the end of an input field, the cursor moves automatically to the next.') DISPLAYPOSITION(8) HEIGHT(33) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(8) TABSTOP(False) TOP(8) WIDTH(425)
EVTROUTINE handling(#CKBX_AUTOTAB.Click)
IF cond('#CKBX_AUTOTAB.ButtonState = Checked')
SET com(#EMPNO) AUTOTAB(TRUE)
SET com(#EDIT_1) AUTOTAB(TRUE)
SET com(#SALARY) AUTOTAB(TRUE)
SET com(#spdt_1) AUTOTAB(TRUE)
ELSE
SET com(#EMPNO) AUTOTAB(false)
SET com(#EDIT_1) AUTOTAB(false)
SET com(#SALARY) AUTOTAB(false)
SET com(#spdt_1) AUTOTAB(false)
ENDIF
ENDROUTINE
END_COM


HideSelection property

HideSelection controls whether a selection is shown in an edit box when it does not have focus.

Set this property to True to hide the selection when the edit box is not selected.


MaxLength property

MaxLength sets the maximum number of characters that can be entered in an edit box.


Visual Pick list

Pick lists are lists from which you can select items

Visual Picklist properties


Visual Picklist properties

Appearance property

Columns property

ComponentVersion property

Orientation property


Appearance property

Use the Appearance property to control how the picklist is displayed. It can have the following values:

ButtonSet

The picklist is displayed as a set of radio buttons. This is the default Appearance.

This is the component definition of field #SEX which can have F or M as the value:

Begin_Com Role(*EXTENDS #PRIM_OBJT)

Begin_Com Role(*Visual #PRIM_EVPL) Name(#PICKLIST) Defaultvisual(True) Height(46) Width(270)
End_Com
Begin_Com Role(*picklist) Name(#LIST)
Define_Com Class(#PRIM_PKIT) Name(#ITEM1) Value('M') Caption('Male') Parent(#LIST) Default(true)
Define_Com Class(#PRIM_PKIT) Name(#ITEM2) Value('F') Caption('Female') Parent(#LIST)
End_Com
End_Com

CheckBox

A single check box is displayed without any picklist item captions. You can only use two picklist items when the Appearance is CheckBox. At run-time, when the check box is not ticked, the value of the first picklist item is assigned to the field, when the check box is ticked, the value of the second pick list item is assigned to the field.

This is the component definition of field #NOTIFY which can have Y or N as the value:

Begin_Com Role(*EXTENDS #PRIM_OBJT)

Begin_Com Role(*Visual #PRIM_EVPL) Name(#PICKLIST) Appearance(CheckBox) Defaultvisual(True) Height(46) Width(270)
End_Com
Begin_Com Role(*picklist) Name(#LIST)
Define_Com Class(#PRIM_PKIT) Name(#ITEM1) Value('Y') Parent(#LIST) Default(true)
Define_Com Class(#PRIM_PKIT) Name(#ITEM2) Value('N') Parent(#LIST)
End_Com
End_Com

DropDownList

The picklist is displayed as a drop-down list.

Listbox

The picklist is displayed as a list box.

Image

The picklist is displayed as images.

ImageAndText

The picklist is displayed as images with text captions.


Columns property

Use the Columns property to specify the number of columns in the picklist.


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 11.0.

1 indicates LANSA version 11.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 the values of the ShowSelection and ShowSelectionHilight properties will be applied to Listbox appearances.


Orientation property

Orientation controls the orientation of items in the picklist

Use the Orientation property to control the orientation of items in the picklist when the Appearance is set to ButtonSet and the list has more than one column.

The column count must be set to greater than 1 to see the effect of the Picklist orientation.


List Box

List box is a basic list

Use a list box to display a list of items from which the user can select one or more. If the number of items exceeds the number that can be displayed, a scroll bar is automatically added to the list box.

A list box is the most basic list control. To use features such as different view styles, icons, sorting or column headers, choose the list view control. To show hierarchical data in a list, use the tree view.

To define the data shown in a list, start by dragging the fields you want from the fields or files tab of the repository browser. Every field you drag to the list creates a list column. The list columns have their own properties which you can modify.

After you have defined the list, specify the data to be retrieved and add it to the list using the SELECT and ADD_ENTRY statements.

List Box Properties


List Box Properties

Cell property


Cell property

Use the Cell property to work with cells in the list box.

You can assign images to individual cells and to columns.

Parameters

Row Parameter

Column parameter


Row Parameter

The Row property of a cell identifies the row of a cell.


Column parameter

The Column property of a cell identifies the column of a cell.


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 the DLT_ENTRY command will trigger ItemGotFocus, ItemLostFocus, ItemGotSelection and ItemLostSelection events.


List box cell

Use the list box cell to work with individual cells in the list box.

List box cell Properties


List box cell Properties

Column property

Item property

ListBox property

IntegralHeight property


Column property

The Column property of a cell identifies the column of a cell.


Item property

Use the Item property to return the list box item component corresponding to the cell.


ListBox property

The ListBox property returns the name of the list box to which this cell belongs.


IntegralHeight property

Integral Height controls whether partial items are displayed in a list. If this property is set to True, no partial lines are displayed.


List view

Use a list view to offer the user various ways of displaying a list. You can arrange items into columns with or without column headings as well as display accompanying icons and text.

To define the data shown in a list, start by dragging the fields you want from the fields or files tab of the repository browser. Every field you drag to the list creates a list column. The list columns have their own properties which you can modify.

After you have defined the list, specify the data to be retrieved and add it to the list using the SELECT and ADD_ENTRY statements.

The list view has a ViewStyle property which is used to specify how the list is displayed. The icons for the list view items are assigned using the set command:

set com(#ltvw_1.currentitem) image(#myicon)

For an example of how to position to an entry in a list view, see SET example 162: Position to an Entry in a List View.

List view Properties

List view Methods


List view Properties

AutoArrange property

Checkboxes property

ColumnHeaderPress property

ComponentVersion property

IconAlignment property

ValueAt


AutoArrange property

AutoArrange is automatic icon arrangement

Determines whether the icons in a list view's Icon or SmallIcon view are arranged automatically. Only effective for Icon or SmallIcon view.


Checkboxes property

Checkboxes can be displayed for items in the list view

Use the Checkboxes property to display check boxes for items in the list view. The check boxes are displayed when the property is set to True.

The check box is selected when the user clicks on it or when the Checked property of the item is set programmatically. To find out if an item in the list view has been selected, use the Checked property of the item.

Note that any images specified using the ImageState property of the item are ignored when the Checkboxes property is set to True and the ComponentVersion property is set to 0.

Clicking on the check box triggers an ItemChanged event for the list view.

To see how this property is used, you can copy and paste the following code to a form. Items with a selected check box in the first list are added to the second list. When the check box is cleared, the item is removed from the second list:

Function Options(*DIRECT)

BEGIN_COM HEIGHT(331) LEFT(302) TOP(108) WIDTH(535)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_1) CHECKBOXES(True) DISPLAYPOSITION(2) FULLROWSELECT(True) HEIGHT(304) LEFT(0) PARENT(#COM_OWNER) SELECTIONSTYLE(Single) TABPOSITION(2) TOP(0) WIDTH(236)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_2) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(304) LEFT(240) PARENT(#COM_OWNER) SELECTIONSTYLE(Single) TABPOSITION(1) TOP(0) WIDTH(287)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#LTVW_1) SOURCE(#EMPNO) WIDTH(26)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) DISPLAYPOSITION(2) PARENT(#LTVW_1) SOURCE(#SURNAME) WIDTH(32)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) DISPLAYPOSITION(3) PARENT(#LTVW_1) SOURCE(#GIVENAME) WIDTH(20) WIDTHTYPE(Remainder)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_4) DISPLAYPOSITION(1) PARENT(#LTVW_2) SOURCE(#EMPNO) WIDTH(24)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_5) DISPLAYPOSITION(2) PARENT(#LTVW_2) SOURCE(#SURNAME) WIDTH(31)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_6) DISPLAYPOSITION(3) PARENT(#LTVW_2) SOURCE(#GIVENAME) WIDTH(20) WIDTHTYPE(Remainder)
Evtroutine Handling(#com_owner.CreateInstance)
Select Fields(#LTVW_1) From_File(PSLMST)
Add_Entry To_List(#LTVW_1)
Endselect
Endroutine
Evtroutine Handling(#LTVW_1.ItemChanged) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
If Cond('#ltvw_1.currentitem.checked = true')
Add_Entry To_List(#LTVW_2)
Else
Invoke Method(#com_owner.remove_item) Employee(#empno)
Endif
Endroutine
Mthroutine Name(Remove_item)
Define_Map For(*input) Class(#empno) Name(#employee)
Selectlist Named(#LTVW_2)
Continue If('#empno *ne #employee.value')
Dlt_Entry From_List(#LTVW_2)
Leave
Endselect
Endroutine
End_Com


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

2 indicates LANSA version 11.0 or later.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 a list view's Alternate color defined in a VisualStyle is displayed and State Images and CheckBoxes can be displayed at same time.

With ComponentVersion 2 the column heading captions of a list view are displayed as multi-line.


IconAlignment property

IconAlignment specifies how icons are aligned

Use the IconAlignment property to specify how icons are to be aligned.


ValueAt

Access an item in a List View using its Row and Column indices.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

COLUMN

Integer index of Column to be accessed.

Example

Returns the value at the specified location:

#ListView ValueAt<#RowIdx #ColIdx>


ColumnHeaderPress property

Use the ColumnHeaderPress property to control whether the column header responds to a click.


List view Methods

SetValue Method


SetValue Method

Set the List View item value at the specified row and column.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

COLUMN

Integer index of Column to be set.

VALUE

Value to be set.

Example

#ListView SetValue<#RowIdx #ColIdx "newValue">


Item Hint Text Parameters

ItemHintTextEvent Caption parameter

ItemHintText Cell parameter


ItemHintTextEvent Caption parameter

Use the Caption parameter of the ItemHintText event to assign the text for the hint.

Make sure that the ShowItemHint property of the component is set to True to display the hint.

The following example is based on the sample PSLMST file. The form has a one-column list view showing first names. The hint for the items is the surname which is included in the list as a hidden column.

FUNCTION OPTIONS(*DIRECT)

BEGIN_COM HEIGHT(292) LEFT(372) TOP(130) WIDTH(216)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#LTVW_1) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(217) LEFT(32) PARENT(#COM_OWNER) SHOWITEMHINT(True) TABPOSITION(1) TOP(16) WIDTH(145)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) DISPLAYPOSITION(1) PARENT(#LTVW_1) SOURCE(#GIVENAME) WIDTH(98)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) PARENT(#LTVW_1) SOURCE(#SURNAME) VISIBLE(False) WIDTH(38)
EVTROUTINE handling(#com_owner.Initialize)
select fields(#ltvw_1) from_file(pslmst)
add_entry #ltvw_1
endselect
ENDROUTINE
EVTROUTINE HANDLING(#LTVW_1.ItemHintText) Caption(#thename)
set #thename value(#surname)
ENDROUTINE
END_COM


ItemHintText Cell parameter

Use the ItemHintText Cell parameter to specify the grid cell for which a hint is displayed.

The following example is based on the PSLMST file. The type of hint displayed for the grid items is determined by the column of the grid cell:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Busyupdates(Immediate) Clientheight(305) Clientwidth(495) Height(332) Left(234) Top(123) Width(503)
Define_Com Class(#PRIM_GRID) Name(#GRID) Captionnoblanklines(True) Columnbuttonheight(34) Componentversion(1) Displayposition(1) Height(249) Left(40) Parent(#COM_OWNER) Showbuttonselection(True) Showitemhint(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(40) Width(321)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_1) Displayposition(1) Parent(#GRID) Source(#EMPNO) Width(50)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_2) Displayposition(2) Parent(#GRID) Readonly(False) Source(#ADDRESS1) Width(50)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_HINTS) Buttonstate(Checked) Caption('Show Hints') Displayposition(2) Left(376) Parent(#COM_OWNER) Tabposition(2) Top(47)
Evtroutine Handling(#com_owner.Initialize)
Change Field(#STD_TEXTS) To('Col 1')
Change Field(#STD_TEXT) To('Col 2')
Select Fields(#GRID) From_File(PSLMST)
Add_Entry To_List(#GRID)
Endselect
Endroutine
Evtroutine Handling(#GRID.ItemHintText) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Caption(#thename) Cell(#Cell)
If_Ref Com(#CELL.Column) Is(*EQUAL_TO #GDCL_1)
Set Com(#thename) Value(#EMPNO)
Else
If_Ref Com(#CELL.Column) Is(*EQUAL_TO #GDCL_2)
Set Com(#thename) Value(#address1)
Else
Set Com(#thename) Value('Unknown')
Endif
Endif
Endroutine
Evtroutine Handling(#CKBX_HINTS.Click)
If Cond('#CKBX_HINTS.buttonstate *eq unchecked')
Set Com(#GRID) Showitemhint(false)
Else
Set Com(#GRID) Showitemhint(true)
Endif
Endroutine
End_Com


Grid

A grid displays data in table format. The user can optionally edit the information in the grid.

To define the data shown in a grid, start by dragging the fields you want from the fields or files tab of the repository browser. Every field you drag to the grid creates a grid column. The grid columns have their own properties which you can modify.

After you have defined the grid, specify the data to be retrieved and add it to the grid using the SELECT and ADD_ENTRY statements.

For an example of how to sort grid columns, see SET example 35: Sorting Grid Columns.

For an example of how to set focus to a specific cell see example 37: Set Focus to a Specific Cell in a Grid

SET example 199 is a reusable pop-up menu which allows the user to customize their view of a grid at run time, refer to: Dynamically Format Grids.

Grid Properties

Grid Events

Grid Methods


Grid Properties

AnchorCell property

CaptionNoBlankLines property

Cell property

ColumnButtons property

ColumnButtonHeight property

ColumnButtonPress property

ColumnEllipses property

ColumnResize property

ComponentVersion property

DragColumns property

EnterKeyStyle property

EscapeKeyStyle property

FocusCell property

FrozenColumns property

RowButtons property

RowButtonWidth property

RowHeight property

RowResize property

RowSizing property

SelectedColumnCount property

SelectedRowCount property

ShowButtonSelection property

ShowLines property

TabbingStyle property

SplitStyle property

ValueAt Property


AnchorCell property

AnchorCell is the cell where selection starts

The AnchorCell is the cell in the grid where selection is anchored (where it starts).

AnchorCell is used with SelectionStyle Multiple or Extended. Once a selection operation is started the anchor cell cannot be changed.

To see what a FocusCell and an AnchorCell are create a grid with SelectionStyle Extended and 10 items. Click on Cell( 1, 1 ) Holding the Shift Key down Click on cell ( 5, 5 ). The FocusCell is cell( 5, 5 ) and the AnchorCell is cell( 1, 1 )

If you now click on Cell( 7,7 ), it becomes the FocusCell and the anchor is still Cell( 1, 1 ).

See also the example for the Cell property.


CaptionNoBlankLines property

CaptionNoBlankLines suppresses the display of blank lines in column headers

When set to True the CaptionNoBlankLines property suppresses spurious blank lines in grid column headers.


Cell property

The Cell property is a cell in a grid. The property has two keys, Row and Column, which identify the cell.

The Cell property corresponds to an instance of a grid cell component. To see what properties the cell component has, double-click on the Cell property on the left.

To see how to work with specific cells in a grid, copy and paste this example to a form and compile and execute it:

function options(*DIRECT)

begin_com role(*EXTENDS #PRIM_FORM) clientheight(389) clientwidth(421) height(423) left(347) top(167) width(429)
define_com class(#PRIM_GRID) name(#GRID_1) columnbuttonheight(18) columnbuttonpress(True) displayposition(2) height(169) left(24) parent(#COM_OWNER) rowresize(True) selectionstyle(Extended) showselection(True) tabposition(2) top(16) width(377)
define_com class(#PRIM_GDCL) name(#GDCL_1) captionalign(Left) displayposition(1) parent(#GRID_1) sortonclick(True) source(#EMPNO) width(36)
define_com class(#PRIM_GDCL) name(#GDCL_2) captionalign(Left) displayposition(2) parent(#GRID_1) source(#SURNAME) width(79) widthtype(Remainder)
define_com class(#PRIM_GPBX) name(#GPBX_13) caption('Style') displayposition(5) height(145) left(240) parent(#GPBX_12) tabposition(9) tabstop(False) top(16) width(121)
define_com class(#PRIM_GPBX) name(#GPBX_12) displayposition(1) height(177) left(24) parent(#COM_OWNER) tabposition(1) tabstop(False) top(192) width(377)
define_com class(#PRIM_RDBN) name(#RDBN_8) caption('Normal') displayposition(2) height(17) left(16) parent(#GPBX_13) tabposition(1) top(16) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_9) caption('Warning') displayposition(1) height(17) left(16) parent(#GPBX_13) tabposition(2) top(32) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_14) caption('Large M') displayposition(7) height(17) left(16) parent(#GPBX_13) tabposition(7) top(112) width(58)
define_com class(#PRIM_RDBN) name(#RDBN_10) caption('Large') displayposition(3) height(17) left(16) parent(#GPBX_13) tabposition(3) top(48) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_13) caption('Emph') displayposition(6) height(17) left(16) parent(#GPBX_13) tabposition(6) top(96) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_11) caption('Smth') displayposition(4) height(17) left(16) parent(#GPBX_13) tabposition(4) top(64) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_12) caption('Title') displayposition(5) height(17) left(16) parent(#GPBX_13) tabposition(5) top(80) width(49)
define_com class(#PRIM_SPDT) name(#SPDT_ROW) displayposition(1) height(17) left(112) parent(#GPBX_12) tabposition(6) top(112) value(1) width(50)
define_com class(#PRIM_SPDT) name(#SPDT_COL) displayposition(2) height(17) left(112) parent(#GPBX_12) tabposition(8) top(136) value(1) width(51)
define_com class(#PRIM_LABL) name(#LABL_1) caption('Row') displayposition(3) height(17) left(56) parent(#GPBX_12) tabposition(5) tabstop(False) top(112) width(49)
define_com class(#PRIM_LABL) name(#LABL_2) caption('Column') displayposition(4) height(21) left(56) parent(#GPBX_12) tabposition(7) tabstop(False) top(136) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_FOCUS) buttonchecked(True) caption('Focus Cell') displayposition(6) height(14) left(24) parent(#GPBX_12) tabposition(1) top(19)
define_com class(#PRIM_RDBN) name(#RDBN_ANCHOR) caption('Anchor Cell') displayposition(7) height(17) left(24) parent(#GPBX_12) tabposition(2) top(40)
define_com class(#PRIM_RDBN) name(#RDBN_CELL) caption('Cell') displayposition(8) height(17) left(24) parent(#GPBX_12) tabposition(4) top(88)
define_com class(#PRIM_RDBN) name(#RDBN_CITEM) caption('Current Item') displayposition(9) height(17) left(24) parent(#GPBX_12) tabposition(3) top(64)
define_com class(#STD_NUM) name(#STD_NUM)
evtroutine handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
select fields(#GRID_1) from_file(PSLMST)
add_entry to_list(#GRID_1)
endselect
endroutine
evtroutine handling(#RDBN_8.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_norm)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_norm)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_norm)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_norm)
endif
endroutine
evtroutine handling(#RDBN_9.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_WARN)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_WARN)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_WARN)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_WARN)
endif
endroutine
evtroutine handling(#RDBN_10.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_Large)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_LARGE)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_Large)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_Large)
endif
endroutine
evtroutine handling(#RDBN_11.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_SMTH)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_smth)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_smth)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_smth)
endif
endroutine
evtroutine handling(#RDBN_12.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_TITLE)
endif
endroutine
evtroutine handling(#RDBN_13.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_EMPH)
endif
endroutine
evtroutine handling(#RDBN_14.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_larem)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_larem)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_larem)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_larem)
endif
endroutine

end_com

Also see

Cell Row property

Cell Column property


Cell Row property

The Row property of a cell identifies the row of a cell.


Cell Column property

The Column property of a cell identifies the column of a cell.


ColumnButtons property

ColumnButtons shows/hides column header buttons. Set this property to False to create a grid or a property sheet without column header buttons.


ColumnButtonHeight property

ColumnButtonHeight sets the height of the column header buttons.


ColumnButtonPress property

Use the ColumnButtonPress property to enable or disable column header buttons. When this property is set to True, the column header buttons are enabled.


ColumnEllipses property

ColumnEllipses adds ellipses to column headers

Use the ColumnEllipses property to specify whether ellipses (three dots) are added to a column header when it is sized so that it is only partially visible.


ColumnResize property

ColumnResize controls whether columns can be resized. Set this property to True to make the columns resizable.


DragColumns property

DragColumns controls column drag-and-drop

DragColumns controls whether columns can be reorganized by dragging and dropping.


EnterKeyStyle property

EnterKeyStyle is a run-time property that determines what happens when Enter key is pressed in a grid.

Use the EnterKeyStyle to determine what happens when the Enter key is pressed in a grid.

By default pressing Enter when the focus is in a grid moves down a line (Down).

Alternatively, you can set the Enter key to:

  • move the focus to the first column in the next row (NextRow)
  • move the focus along the cells of the current row and then down to the following rows, wrapping back to the first row when the last cell has been visited (AroundGrid)
  • move the focus along the cells of the current row and then down to the following rows, leaving the grid once the last cell has been visited (ThroughGrid)
  • trigger the default button on the form. If there is no default button, move down a line in the grid (DialogDown)
  • trigger the default button on the form. If there is no default button, move the focus to the first line in the next row (DialogNextRow)
  • trigger the default button on the form. If there is no default button, move the focus as described by AroundGrid
  • trigger the default button on the form. If there is no default button, move the focus as described by ThroughGrid.


EscapeKeyStyle property

EscapeKeyStyle determines what happens when Escape key is pressed in a grid

A run-time property.

Use the EscapeKeyStyle to determine what happens when Escape key is pressed in a grid.

By default pressing Escape when the focus is in a grid cell resets the value back to its assigned value (CancelEdit).

Alternatively, you can set the Escape key to first trigger the button on the form with ButtonCancel value set to True (DialogCancelEdit). With this value, if there is no button with the ButtonCancel property set to True, pressing the Escape key will reset the value of the cell to its assigned value.


FocusCell property

FocusCell is the cell where selection starts

The FocusCell is the cell in the grid which has the focus.

To see what a FocusCell and an AnchorCell are create a grid with SelectionStyle Extended and 10 items. Click on Cell( 1, 1 ) Holding the Shift Key down Click on cell ( 5, 5 ). The FocusCell is cell( 5, 5 ) and the AnchorCell is cell( 1, 1 )

If you now click on Cell( 7,7 ), it becomes the FocusCell and the anchor is still Cell( 1, 1 ).

See also the example for the Cell property.


FrozenColumns property

FrozenColumns sets number of unmovable columns

Frozen columns do not move when the other columns or rows in the Grid are scrolled.

Frozen columns are typically used in spreadsheet applications for columns that should always be visible.

Specify the number of leftmost columns that you do not want to be part of the horizontal scrolling as the value for this property.


RowButtons property

RowButtons makes the first column of rows into buttons in the grid.


RowButtonWidth property

RowButtonWidth sets the width of the row buttons in the grid.


RowHeight property

RowHeight sets the height of the row in pixels.


RowResize property

RowResize controls whether the rows of the grid or property sheet can be resized. Set this property to True to make the rows resizable.


RowSizing property

Use the RowSizing property to specify how rows are sized. This property only has effect if the RowResize property has been set to True.

To make it possible to resize blocks of rows set the value to Group.

To make row resizing apply to individual row heights set the value to Individual.

To size the rows to their contents, use ContentHeight.

To see how this property works, copy the following code and paste it into a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CLIENTHEIGHT(226) CLIENTWIDTH(412) HEIGHT(253) LEFT(478) TOP(122) WIDTH(420)
DEFINE_COM CLASS(#PRIM_GRID) NAME(#GRID_1) COLUMNBUTTONHEIGHT(18) COLUMNBUTTONPRESS(True) DISPLAYPOSITION(1) HEIGHT(201) LEFT(32) PARENT(#COM_OWNER) ROWRESIZE(True) SHOWSELECTION(True) TABPOSITION(1) TOP(16) WIDTH(233)
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#EMPNO) WIDTH(36)
DEFINE_COM CLASS(#PRIM_GDCL) NAME(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SURNAME) WIDTH(65) WIDTHTYPE(Remainder)
DEFINE_COM CLASS(#PRIM_GPBX) NAME(#GPBX_1) CAPTION('Row Sizing') DISPLAYPOSITION(2) HEIGHT(105) LEFT(280) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(16) WIDTH(121)
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_2) BUTTONCHECKED(True) CAPTION('Group') DISPLAYPOSITION(1) LEFT(8) PARENT(#GPBX_1) TABPOSITION(1) TOP(40) WIDTH(65)
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_1) CAPTION('Individual') DISPLAYPOSITION(2) LEFT(8) PARENT(#GPBX_1) TABPOSITION(2) TOP(16) WIDTH(81)
DEFINE_COM CLASS(#PRIM_RDBN) NAME(#RDBN_3) CAPTION('ContentHeight') DISPLAYPOSITION(3) LEFT(8) PARENT(#GPBX_1) TABPOSITION(3) TOP(64) WIDTH(105)
EVTROUTINE handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#GRID_1) from_file(PSLMST)
ADD_ENTRY to_list(#GRID_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#RDBN_1.Click)
IF cond('#RDBN_1.buttonchecked *eq true')
SET com(#grid_1) ROWSIZING(Individual)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_2.Click)
IF cond('#RDBN_2.buttonchecked *eq true')
SET com(#grid_1) ROWSIZING(group)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_3.Click)
IF cond('#RDBN_3.buttonchecked *eq true')
SET com(#grid_1) ROWSIZING(ContentHeight)
ENDIF
ENDROUTINE
END_COM


SelectedColumnCount property

SelectedColumnCount shows how many columns have been selected

Use the SelectedColumnCount property to retrieve the number of columns currently selected.

To see how this property works, copy the following code and paste it into a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(330) LEFT(285) TOP(124) WIDTH(524)
DEFINE_COM class(#PRIM_GRID) name(#GRID_1) COLUMNBUTTONHEIGHT(18) COLUMNBUTTONPRESS(True) DISPLAYPOSITION(1) HEIGHT(201) LEFT(32) PARENT(#COM_OWNER) SHOWBUTTONSELECTION(False) SHOWSELECTION(True) TABPOSITION(1) TOP(16) WIDTH(321)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#EMPNO) WIDTH(36)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SURNAME) WIDTH(65) WIDTHTYPE(Remainder)
DEFINE_COM class(#STD_NUM.Visual) name(#STD_NUM) CAPTION('Selected Rows:') DISPLAYPOSITION(2) HEIGHT(19) LABELTYPE(Caption) LEFT(32) MARGINLEFT(100) PARENT(#COM_OWNER) TABPOSITION(2) TOP(232) WIDTH(262)
DEFINE_COM class(#STD_NUM.Visual) name(#STD_NUM_1) CAPTION('Selected Columns:') DISPLAYPOSITION(3) HEIGHT(19) LABELTYPE(Caption) LEFT(32) MARGINLEFT(100) PARENT(#COM_OWNER) TABPOSITION(3) TOP(256) WIDTH(262)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_1) CAPTION('Selection Style') DISPLAYPOSITION(4) HEIGHT(121) LEFT(368) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(16) WIDTH(137)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_1) BUTTONCHECKED(True) CAPTION('Single') DISPLAYPOSITION(1) LEFT(8) PARENT(#GPBX_1) TABPOSITION(1) TOP(16)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_2) CAPTION('Multiple') DISPLAYPOSITION(2) LEFT(8) PARENT(#GPBX_1) TABPOSITION(2) TOP(40)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_3) CAPTION('Extended') DISPLAYPOSITION(3) LEFT(8) PARENT(#GPBX_1) TABPOSITION(3) TOP(64)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_4) CAPTION('Whole Row') DISPLAYPOSITION(4) LEFT(8) PARENT(#GPBX_1) TABPOSITION(4) TOP(88)
EVTROUTINE handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#GRID_1) from_file(PSLMST)
ADD_ENTRY to_list(#GRID_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#GRID_1.Changed) options(*NOCLEARMESSAGES *NOCLEARERRORS)
CHANGE field(#STD_NUM) to('#GRID_1.SelectedROWCount')
CHANGE field(#STD_NUM_1) to('#GRID_1.SelectedColumnCount')
ENDROUTINE
EVTROUTINE handling(#RDBN_1.Click)
IF cond('#RDBN_1.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(single)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_2.Click)
IF cond('#RDBN_2.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(multiple)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_3.Click)
IF cond('#RDBN_3.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(extended)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_4.Click)
IF cond('#RDBN_4.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(WholeRow)
ENDIF
ENDROUTINE
END_COM


SelectedRowCount property

SelectedRowCount shows how many columns have been selected

Use the SelectedRowCount property to retrieve the number of rows currently selected.

To see how this property works, copy the following code and paste it into a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(330) LEFT(285) TOP(124) WIDTH(524)
DEFINE_COM class(#PRIM_GRID) name(#GRID_1) COLUMNBUTTONHEIGHT(18) COLUMNBUTTONPRESS(True) DISPLAYPOSITION(1) HEIGHT(201) LEFT(32) PARENT(#COM_OWNER) SHOWBUTTONSELECTION(False) SHOWSELECTION(True) TABPOSITION(1) TOP(16) WIDTH(321)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#EMPNO) WIDTH(36)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SURNAME) WIDTH(65) WIDTHTYPE(Remainder)
DEFINE_COM class(#STD_NUM.Visual) name(#STD_NUM) CAPTION('Selected Rows:') DISPLAYPOSITION(2) HEIGHT(19) LABELTYPE(Caption) LEFT(32) MARGINLEFT(100) PARENT(#COM_OWNER) TABPOSITION(2) TOP(232) WIDTH(262)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_1) CAPTION('Selection Style') DISPLAYPOSITION(4) HEIGHT(121) LEFT(368) PARENT(#COM_OWNER) TABPOSITION(4) TABSTOP(False) TOP(16) WIDTH(137)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_1) BUTTONCHECKED(True) CAPTION('Single') DISPLAYPOSITION(1) LEFT(8) PARENT(#GPBX_1) TABPOSITION(1) TOP(16)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_2) CAPTION('Multiple') DISPLAYPOSITION(2) LEFT(8) PARENT(#GPBX_1) TABPOSITION(2) TOP(40)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_3) CAPTION('Extended') DISPLAYPOSITION(3) LEFT(8) PARENT(#GPBX_1) TABPOSITION(3) TOP(64)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_4) CAPTION('Whole Row') DISPLAYPOSITION(4) LEFT(8) PARENT(#GPBX_1) TABPOSITION(4) TOP(88)
EVTROUTINE handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#GRID_1) from_file(PSLMST)
ADD_ENTRY to_list(#GRID_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#GRID_1.Changed) options(*NOCLEARMESSAGES *NOCLEARERRORS)
CHANGE field(#STD_NUM) to('#GRID_1.SelectedROWCount')
ENDROUTINE
EVTROUTINE handling(#RDBN_1.Click)
IF cond('#RDBN_1.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(single)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_2.Click)
IF cond('#RDBN_2.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(multiple)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_3.Click)
IF cond('#RDBN_3.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(extended)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_4.Click)
IF cond('#RDBN_4.buttonchecked *eq true')
SET com(#grid_1) SELECTIONSTYLE(WholeRow)
ENDIF
ENDROUTINE
END_COM


ShowButtonSelection property

ShowButtonSelection controls the appearance of column header button

Set the ShowButtonSelection to True if you want the caption of the column header button to be highlighted when an item in that column is selected.

To see how this property works, copy the following code and paste it into a form, compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(258) LEFT(336) TOP(124) WIDTH(472)
DEFINE_COM class(#PRIM_GRID) name(#GRID_1) COLUMNBUTTONHEIGHT(18) COLUMNBUTTONPRESS(True) DISPLAYPOSITION(1) HEIGHT(201) LEFT(32) PARENT(#COM_OWNER) ROWRESIZE(True) SHOWBUTTONSELECTION(False) SHOWSELECTION(True) TABPOSITION(1) TOP(16) WIDTH(281)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SORTONCLICK(True) SOURCE(#EMPNO) WIDTH(29)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SURNAME) WIDTH(65) WIDTHTYPE(Remainder)
DEFINE_COM class(#PRIM_GPBX) name(#GPBX_1) CAPTION('ShowButtonSelection') DISPLAYPOSITION(2) HEIGHT(73) LEFT(320) PARENT(#COM_OWNER) TABPOSITION(2) TABSTOP(False) TOP(16) WIDTH(121)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_2) BUTTONCHECKED(True) CAPTION('False') DISPLAYPOSITION(1) LEFT(8) PARENT(#GPBX_1) TABPOSITION(1) TOP(40) WIDTH(65)
DEFINE_COM class(#PRIM_RDBN) name(#RDBN_1) CAPTION('True') DISPLAYPOSITION(2) LEFT(8) PARENT(#GPBX_1) TABPOSITION(2) TOP(16) WIDTH(81)
EVTROUTINE handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#GRID_1) from_file(PSLMST)
ADD_ENTRY to_list(#GRID_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#RDBN_1.Click)
IF cond('#RDBN_1.buttonchecked *eq true')
SET com(#grid_1) SHOWBUTTONSELECTION(True)
ENDIF
ENDROUTINE
EVTROUTINE handling(#RDBN_2.Click)
IF cond('#RDBN_2.buttonchecked *eq true')
SET com(#grid_1) SHOWBUTTONSELECTION(False)
ENDIF
ENDROUTINE
END_COM


ShowLines property

ShowLines controls whether grid lines are visible. Set this property to False to hide the grid lines.


TabbingStyle property

The TabbingStyle AlongRow moves the cursor from one cell to another on the row when the TAB key is pressed.

AroundGrid moves the cursor from one cell to another on the row when the TAB key is pressed and then moves on to the next line.

LeaveGrid moves the cursor from the grid when the TAB key is pressed.

ThroughGrid moves the cursor like AroundGrid except when the bottom right or top left cells have focus. When the bottom right cell has focus and the TAB key is pressed or the top left cell has focus and the Back-TAB key is pressed, ThroughGrid will move the cursor like LeaveGrid.


SplitStyle property

Use the SplitStyle property to enable independent pane scrolling (similar to the way that Excel can be viewed). In this way the user of a grid can view different portions of the grid at once.

Normally splitting a window begins by the user grabbing the split handle in the top right of the grid for vertical splitting and in the bottom left for horizontal splitting.

You can set SplitStyle to split the grid in two horizontally aligned panes, two vertically aligned panes or four panes (both).

If the grid is split vertically then the user can keep a certain number of rows always in view with the top pane while they scroll data further with the lower pane.


ValueAt Property

Obtain the value at the specified row and column.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

COLUMN

Integer index of Column to be accessed.

Example

Begin_Loop Using(#RowIdx) To(3)

Begin_Loop Using(#ColIdx) To(#Grid1.columns.itemcount)

#StringVal := #Grid1.ValueAt<#RowIdx #ColIdx>

* do something useful with #StringVal …

End_Loop

End_Loop


Grid Events

EditorChanged event


EditorChanged event

The EditorChanged event is triggered when a change is made in the editor for the column. For example in an edit box editor the event is triggered on each keystroke.


Grid Methods

SetValue Method


SetValue Method

Set the Grid item value at the specified location.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

COLUMN

Integer index of Column to be set.

VALUE

Value to be set.

Example

#Grid1.SetValue ( 1 1 "11" )


StartSplit method

StartSplit enables independent pane scrolling

A component can be viewed as multiple panes (similar to the way that Excel can be viewed). In this way the user of a component can view different portions of the component at once.

If the component is split vertically then the user can keep a certain number of rows always in view with the top pane while they scroll data further with the lower pane.

The SplitStyle property governs the type of split behavior available for the component.

Normally splitting a window begins by the user grabbing the split handle in the top right of the component for vertical splitting and in the bottom left for horizontal splitting. StartSplit is a programmatic way of simulating this effect. Use it to start a split operation without any input from the user.


Grid Cell

Use the grid cell component to work with individual cells in a grid.

Grid Cell Properties

Grid Cell Method


Grid Cell Properties

Column property

Item property

Grid property

CellReadOnly property


Column property

Use the Column property to return the grid column to which this cell belongs.


Item property

Use the Item property to return the grid Item component corresponding to the cell.


Grid property

Use the Grid property to return the grid to which this cell belongs.


CellReadOnly property

The CellReadOnly property is maintained for backward compatibility only. It is recommended that you use the ReadOnly property of the Cell component instead.


Grid Cell Method

SetValue Method


SetValue Method

Use this method to set the value of a Grid Cell.

RESULT

Boolean indicating if set was successful (TRUE)

VALUE

Value to be set.

Example

#Grid1.Cell<1 1>.SetValue ( "8" )

#Grid1.Cell<1 2>.SetValue ( "9" )

#Grid1.Cell<2 1>.SetValue ( "1" )

#Grid1.Cell<2 2>.SetValue ( "2" )


GridItem

GridItem Properties

GridItem Methods


GridItem Properties

ValueAt Poperty

Cell property

Column parameter


ValueAt Poperty

Access the value of a Grid Cell.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

Example

#Value := #Grid1.ValueAt<#RowIdx #ColIdx>


Cell property

The Cell property is a cell in a grid.

To see how to work with specific cells in a grid, copy and paste this example to a form and compile and execute it:

function options(*DIRECT)

begin_com role(*EXTENDS #PRIM_FORM) clientheight(389) clientwidth(421) height(423) left(347) top(167) width(429)
define_com class(#PRIM_GRID) name(#GRID_1) columnbuttonheight(18) columnbuttonpress(True) displayposition(2) height(169) left(24) parent(#COM_OWNER) rowresize(True) selectionstyle(Extended) showselection(True) tabposition(2) top(16) width(377)
define_com class(#PRIM_GDCL) name(#GDCL_1) captionalign(Left) displayposition(1) parent(#GRID_1) sortonclick(True) source(#EMPNO) width(36)
define_com class(#PRIM_GDCL) name(#GDCL_2) captionalign(Left) displayposition(2) parent(#GRID_1) source(#SURNAME) width(79) widthtype(Remainder)
define_com class(#PRIM_GPBX) name(#GPBX_13) caption('Style') displayposition(5) height(145) left(240) parent(#GPBX_12) tabposition(9) tabstop(False) top(16) width(121)
define_com class(#PRIM_GPBX) name(#GPBX_12) displayposition(1) height(177) left(24) parent(#COM_OWNER) tabposition(1) tabstop(False) top(192) width(377)
define_com class(#PRIM_RDBN) name(#RDBN_8) caption('Normal') displayposition(2) height(17) left(16) parent(#GPBX_13) tabposition(1) top(16) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_9) caption('Warning') displayposition(1) height(17) left(16) parent(#GPBX_13) tabposition(2) top(32) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_14) caption('Large M') displayposition(7) height(17) left(16) parent(#GPBX_13) tabposition(7) top(112) width(58)
define_com class(#PRIM_RDBN) name(#RDBN_10) caption('Large') displayposition(3) height(17) left(16) parent(#GPBX_13) tabposition(3) top(48) width(68)
define_com class(#PRIM_RDBN) name(#RDBN_13) caption('Emph') displayposition(6) height(17) left(16) parent(#GPBX_13) tabposition(6) top(96) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_11) caption('Smth') displayposition(4) height(17) left(16) parent(#GPBX_13) tabposition(4) top(64) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_12) caption('Title') displayposition(5) height(17) left(16) parent(#GPBX_13) tabposition(5) top(80) width(49)
define_com class(#PRIM_SPDT) name(#SPDT_ROW) displayposition(1) height(17) left(112) parent(#GPBX_12) tabposition(6) top(112) value(1) width(50)
define_com class(#PRIM_SPDT) name(#SPDT_COL) displayposition(2) height(17) left(112) parent(#GPBX_12) tabposition(8) top(136) value(1) width(51)
define_com class(#PRIM_LABL) name(#LABL_1) caption('Row') displayposition(3) height(17) left(56) parent(#GPBX_12) tabposition(5) tabstop(False) top(112) width(49)
define_com class(#PRIM_LABL) name(#LABL_2) caption('Column') displayposition(4) height(21) left(56) parent(#GPBX_12) tabposition(7) tabstop(False) top(136) width(49)
define_com class(#PRIM_RDBN) name(#RDBN_FOCUS) buttonchecked(True) caption('Focus Cell') displayposition(6) height(14) left(24) parent(#GPBX_12) tabposition(1) top(19)
define_com class(#PRIM_RDBN) name(#RDBN_ANCHOR) caption('Anchor Cell') displayposition(7) height(17) left(24) parent(#GPBX_12) tabposition(2) top(40)
define_com class(#PRIM_RDBN) name(#RDBN_CELL) caption('Cell') displayposition(8) height(17) left(24) parent(#GPBX_12) tabposition(4) top(88)
define_com class(#PRIM_RDBN) name(#RDBN_CITEM) caption('Current Item') displayposition(9) height(17) left(24) parent(#GPBX_12) tabposition(3) top(64)
define_com class(#STD_NUM) name(#STD_NUM)
evtroutine handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
select fields(#GRID_1) from_file(PSLMST)
add_entry to_list(#GRID_1)
endselect
endroutine
evtroutine handling(#RDBN_8.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_norm)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_norm)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_norm)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_norm)
endif
endroutine
evtroutine handling(#RDBN_9.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_WARN)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_WARN)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_WARN)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_WARN)
endif
endroutine
evtroutine handling(#RDBN_10.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#vs_Large)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_LARGE)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_Large)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_Large)
endif
endroutine
evtroutine handling(#RDBN_11.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_SMTH)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#vs_smth)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#vs_smth)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#vs_smth)
endif
endroutine
evtroutine handling(#RDBN_12.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_TITLE)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_TITLE)
endif
endroutine
evtroutine handling(#RDBN_13.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_EMPH)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_EMPH)
endif
endroutine
evtroutine handling(#RDBN_14.Click)
if cond('#RDBN_CITEM.Buttonchecked = true')
set com(#GRID_1.currentitem) visualstyle(#VS_larem)
endif
if cond('#RDBN_FOCUS.Buttonchecked = true')
set com(#GRID_1.focuscell) visualstyle(#VS_larem)
endif
if cond('#RDBN_anchor.Buttonchecked = true')
set com(#GRID_1.anchorcell) visualstyle(#VS_larem)
endif
if cond('#RDBN_cell.Buttonchecked = true')
set com(#GRID_1.cell<#SPDT_ROW.Value #SPDT_COL.Value>) visualstyle(#VS_larem)
endif
endroutine

end_com


Column parameter

The Column parameter is used to specify the grid column of the cell.


GridItem Methods

SetValue Method


SetValue Method

Set the value of a Grid Cell.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

VALUE

Value to be set.

Example

#Grid1.Items<2>.SetValue ( 1 "21" )


Combo Box

A combo box presents a list which fits into a small space and to which the user can add entries.

A combo box combines the features of an edit box and a list box. The user can enter information in the edit area or select an item from the list. When the user selects an entry in the list, the entry is displayed in the edit area.

Use the ComboBoxStyle property to set the style of the combo box (whether the user can add entries and whether the list is a drop-down or ordinary list).

To define the data shown in a combo box, start by dragging the fields you want from the fields or files tab of the Repository Browser. Every field you drag to the combo box creates a combo box column. The columns have their own properties which you can modify.

After you have defined the combo box, specify the data to be retrieved and add it to the list using the SELECT and ADD_ENTRY statements.

Note that even though you can have multiple columns in a combo box, only one column can be visible in its edit area. This is the column with the DisplayPosition property set to 1.

At run-time the edit area of the combo box is empty if no entry has been selected in the list portion. To display an entry in edit area of the combo box when a form is first shown, make sure the combo box has the focus. You can do this either by setting its TabPosition to 1 or by adding code like this in the Initialize event of the form:

GET_ENTRY NUMBER(1) FROM_LIST(#CMBX_1)

SET #CMBX_1.CURRENTITEM FOCUS(TRUE)

For an example of how to dynamically create combo boxes see SET example 67: Dynamically Creating Drop Down Lists.

Also see

Combo Box Cell

Combo Box Properties

Combo Box Events

Combo Box Methods


Combo Box Properties

AutoSelectItem property

Cell property

ComboBoxStyle property

ComponentVersion property

DropDownCount property

FixedHeight property

IntegralHeight property

DropDownWidth Property


AutoSelectItem property

AutoSelectItem automatically sets the first item

Set the AutoSelectItem property to False if you do not want to fill the edit portion of a drop-down combo box with the first item in the list when the combo box receives focus.

To see how AutoSelectItem works, copy and paste the following code to a form and compile and execute it:

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) CAPTION('AutoSelectItem & AutoTab Example') HEIGHT(149) LEFT(336) TOP(158) WIDTH(264)
DEFINE_COM class(#PRIM_CKBX) name(#CKBX_AUTOSEL) CAPTION('AutoSelectItem True') DISPLAYPOSITION(2) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(2) TOP(8)
DEFINE_COM class(#PRIM_CMBX) name(#CMBX_1) AUTOSELECT(False) AUTOSELECTITEM(False) DISPLAYPOSITION(3) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(3) TOP(40) VALUE('ABCDE') WIDTH(217)
DEFINE_COM class(#PRIM_CBCL) name(#CBCL_1) DISPLAYPOSITION(1) PARENT(#CMBX_1) SOURCE(#EMPNO) WIDTH(20)
DEFINE_COM class(#PRIM_PHBN) name(#PHBN_1) CAPTION('Reload') DISPLAYPOSITION(1) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(80) WIDTH(115)
EVTROUTINE handling(#com_owner.Initialize)
SET com(#com_owner) CAPTION(*component_desc)
SELECT fields(#CMBX_1) from_file(PSLMST)
ADD_ENTRY to_list(#CMBX_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#PHBN_1.Click)
CLR_LIST named(#CMBX_1)
SELECT fields(#CMBX_1) from_file(PSLMST)
ADD_ENTRY to_list(#CMBX_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#CKBX_AUTOSEL.Click)
IF cond('#CKBX_AUTOSEL.ButtonState = Checked')
SET com(#CMBX_1) AUTOSELECTITEM(TRUE)
ELSE
SET com(#CMBX_1) AUTOSELECTITEM(false)
ENDIF
ENDROUTINE
END_COM


Cell property

Use the Cell property to work with cells in the combo box.

You can assign images to individual cells and to columns.

Also see

Cell parameter

Row parameter


Cell parameter

The Column property of a cell identifies the column of a cell.


Row parameter

The Row property of a cell identifies the row of a cell.


ComboBoxStyle property

ComboBoxStyle sets the type of combo box and the behavior of its list portion.

The combo box styles are:

Simple: Includes a edit area and a list portion which is always visible. The user can select from the list or type in the edit area.

Drop-Down: An edit box with a list that drops down when the user clicks the spin button in the edit box. The user can select from the list or type a new entry in the edit area.

Drop-Down List: Like a drop-down, but the user cannot type in the edit area.

Note that when you first display a drop-down or a drop-down list combo box, you should make sure its edit area contains an entry because its list portion is not visible. You can do this by setting the focus on the combo box:

INVOKE #CMBX_1.SETFOCUS

in which case the first entry of the list is displayed. Alternatively you can set the focus on a specific item in the combo box:

GET_ENTRY NUMBER(3) FROM_LIST(#CMBX_1)

SET #CMBX_1.CURRENTITEM FOCUS(TRUE)


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

When the combo box ComponentVersion is set to 1, the ShowSelection property works with DropDownList Combo style.

In addition in ComponentVersion 1 the DLT_ENTRY command will trigger ItemGotFocus and ItemLostFocus events.


DropDownCount property

DropDownCount sets number of items shown

This property specifies the number of entries shown in a drop down or drop down list combo box. (The Height property only applies to a combo box with ComboBoxStyle Simple).

If more entries are contained in the list, a scroll bar will be automatically included.


FixedHeight property

Use the FixedHeight property to control whether the combo box height can be adjusted.

By default the FixedHeight property is set to True. When it is set to False the combobox can be resized vertically.


DropDownWidth Property

LPVOCOMBOBOXCONTROLDROPDOWNWIDTHHELP

Determines the width of the dropdown shown when the combo box is opened. This allows the combo box to have a dropdown different in width the to the combo box itself.

DropDownWidth is a percentage. The default is 100


Combo Box Events

CloseUp Event

DropDown Event


CloseUp Event

CloseUp event happens when the list box portion of the combo box is hidden.


DropDown Event

Occurs when the list portion of a combo box drops down.

This event does not occur if the ComboBoxStyle property is set to Simple.


Continue Event Parameter

Set the Continue parameter to True to proceed with the event or set it to false to cancel the Event.

This parameter is currently only used with the combo box DropDown but is intended for other uses in the future.


Combo Box Methods

OpenDropDown method

CloseDropDown method


OpenDropDown method

The OpenDropDown method forces the list box portion of a DropDown or DropDownList style combo box to be shown.

OpenDropDown will return True if the control has a list box to drop down and that list box is not already down; otherwise, False.


CloseDropDown method

The CloseDropDown method forces the list box portion of a DropDown or DropDownList style combo box to be closed.

CloseDropDown will return True if the control has a list box to drop down and that list box is already down; otherwise, False.


Combo Box Cell

Use the combo box cell to work with individual cells in the combo box.

Combo Box Cell Properties


Combo Box Cell Properties

Column property

Item property

ComboBox property


Item property

Use the Item property to return the combo box item component corresponding to the cell.


ComboBox property

The ComboBox property returns the name of the combo box to which this cell belongs.


Explorer

Shows files and folders

Use the explorer component to view files and directories either on local hard disks or across the network.

The events of the explorer component pass the file name, path and path type as parameters. The following sample code assigns this information to LANSA fields as an item gets the focus in an explorer component:

Evtroutine Handling(#ExplorerLeft.ItemGotFocus #ExplorerRight.ItemGotFocus) Path(#Path) Pathtype(#Type) Name(#File)

#FileName := #File
#PathName := #Path
#PathType := #Type

Endroutine

To use two explorer components, one for showing directories and paths and one for showing the files in them (similar to Windows Explorer), you can implement the communication between the two components using the NotifyComponent property of the first explorer component.

For an example of how to use the explorer, see SET example 44 or copy and paste the following code (includes the small event routine handler above) to a form:

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Explorer Sample Application') Clientheight(432) Clientwidth(767) Height(470) Left(132) Top(212) Width(783)
Define_Com Class(#PRIM_DCBX) Name(#ExplorerLeft) Displayposition(1) Fileincludemask('"*.*"') Filename('Desktop') Height(329) Left(8) Notifycomponent(#ExplorerRight) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(24) Width(345)
Define_Com Class(#PRIM_DCBX) Name(#ExplorerRight) Displayposition(2) Displaystyle(GeneralListView) Fileincludemask('"*.*"') Filename('Desktop') Height(329) Left(360) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(24) Width(393)
Define_Com Class(#PRIM_LABL) Name(#LABL_2) Caption('Explorer 1') Displayposition(3) Height(17) Left(8) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(8) Width(98)
Define_Com Class(#PRIM_LABL) Name(#LABL_3) Caption('Explorer 2') Displayposition(4) Height(17) Left(360) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(8) Width(98)
Define_Com Class(#STD_QSEL.Visual) Name(#FileName) Caption('Filename') Displayposition(5) Height(20) Labeltype(Caption) Left(8) Marginleft(120) Parent(#COM_OWNER) Tabposition(5) Top(408) Usepicklist(False) Width(500)
Define_Com Class(#STD_QSEL.Visual) Name(#PathName) Caption('Path') Displayposition(6) Height(20) Labeltype(Caption) Left(8) Marginleft(120) Parent(#COM_OWNER) Tabposition(6) Top(384) Usepicklist(False) Width(500)
Define_Com Class(#STD_QSEL.Visual) Name(#PathType) Caption('Path type') Displayposition(7) Height(20) Labeltype(Caption) Left(8) Marginleft(120) Parent(#COM_OWNER) Tabposition(7) Top(360) Usepicklist(False) Width(500)

Evtroutine Handling(#ExplorerLeft.ItemGotFocus #ExplorerRight.ItemGotFocus) Path(#Path) Pathtype(#Type) Name(#File)

#FileName := #File
#PathName := #Path
#PathType := #Type

Endroutine

End_Com


Explorer Properties

AppendPathSeparator property

ApplySecurity property

ArrangeBy property

AutoRefresh property

DisplayStyle property

DriveSpaceFree property

DriveSpaceTotal property

FileName property

FileTypeMask property

IncludeMask property

NotifyComponent property

Path property

PathType property

RootPath property

VisiblePath property


ArrangeBy property

Specifies the order in which items are viewed

Use the ArrangeBy property to control the sort order of the FileListBox view.

You can sort on the filename, or date, or size or by file extension type. Only ascending order is supported.


DisplayStyle property

Selects one of several view styles.

Use the DisplayStyle property to select one of the viewing styles available in the explorer component. You can select any of the following types:

Directory list box

Directory list view

Directory tree view

Drive combo box

File list box

File list view

General list view.


DriveSpaceFree property

Returns the amount of free disk space available on the currently selected path.

Use the DriveSpaceFree property to find out the amount of free disk space available on the current drive.

The value returned is in megabytes.


DriveSpaceTotal property

The size of the currently selected disk drive in megabytes.

Use the DriveSpaceTotal property to find out the size of the currently selected disk drive in megabytes.

The returned value represents the total capacity regardless of the space used.


Path property

Specifies the current location within a network or local drive.

Use the Path property to specify the current location within a network or local drive.


PathType property

Use the PathType property to identify the selected item type within the component view.

Types include:

Desktop

My Computer

Network Neighborhood

Global Network

Local Drive

Network Drive

Mapped Network Drive

Folder

File

For example, if the user clicks on the desktop icon when in treeview display mode, the PathType property is set to Desktop.


IncludeMask property

Filename filtering mechanism.

Allows the explorer component to filter the names of files that it finds and to display only those that match.

FileIncludeMask supports the asterisk '*' and the question mark '?' operators

'*' means match any string of characters

'?' means match any character.

For example:

*.* - Match every file

*.ico - Match every file with thefile extension ".ico".

?? .ico - Match every file with two characters before the file extension ".ico".

t*.ico - Match every ".ico" file starting with the letter 't'.


FileTypeMask property

Controls the display of files with certain attributes.

Use the FileTypeMask to control which files are to be displayed. The file filtering can be based on these file attributes:

All

Archive

Directory

Hidden

Normal

ReadOnly

System


AutoRefresh property

This feature is no longer supported.


AppendPathSeparator property

Controls how the pathname is composed

Use the AppendPathSeparator to control how the path name is composed.

When the value of this property is TRUE, the path property automatically appends a trailing backslash character.


FileName property

The currently selected file.

Use the Filename property to find out the name of the currently selected file.


NotifyComponent property

Identifies an Explorer component that responds to changes in this component.

Use the NotifyComponent property to establish communication between two explorer components. It is useful when building Windows Explorer like applications. To do this:

Define two Explorer components on one form side by side.

At design time, set the DisplayStyle property of the left one to be a DirectoryTreeView ( say DCBX_1) and then set the DisplayStyle of the other (DCBX_2) to be a GeneralListView.

Now select the DirectoryTreeView (DCBX_1) and change the "NotifyComponent" property from *NULL to DCBX_2.

Both components will now respond to changes in each other automatically.

To disable this communication, set the property to back to the default value: *NULL.


ApplySecurity property

Use the ApplySecurity property to control which resources the user can see.

When the value of this property is True, the explorer only displays resources the user is authorized to see by the Windows security settings.


RootPath property

Use the RootPath property to specify the name of the root path.

When the VisiblePath property of the explorer is set to Rootpath, the user's access is restricted to objects below the path you have specified in this property.


VisiblePath property

Use the VisiblePath property to control which paths are visible in the explorer.

The value can be:

  • LocalDrivesOnly. User access is limited to any resources on the local machine.
  • RootPath. User access is limited to the resources under the path specified in the RootPath property.
  • Unrestricted. The user can access all resources (unless restricted using the ApplySecurity property).


Explorer Events

ItemDoubleClick event

PathChanged event


ItemDoubleClick event

Item double-click occurs when the user presses two clicks on the item.


PathChanged event

The PathChanged event occurs when the pathname has changed.


Explorer Method

Refresh method


Refresh method

Use the Refresh method to update the contents of the explorer.


Tree View

Hierarchical display of data

Use a tree view to display a hierarchical list of items, each of which consists of a label and an optional bitmap. A tree view is typically used to display the headings in a document, the entries in an index, the files and directories on a disk, or any other kind of information that suits a hierarchical view.

Start creating a tree view by dragging a tree view control to your form. Then drag the fields to be displayed from the repository to the tree view. Every field you add to the tree view creates a column in the tree view. By default the tree view columns are named TVCL_1, TVCL_2 etc.

Use the Level property of the tree view columns set the hierarchy. Level 1 is the highest level.

Inside the Level, you can use the DisplayPosition property to specify how the contents of the fields are displayed: 0 hides the contents. 1 shows the contents.

Use the KeyPosition property of the tree view columns to specify what part of the key for the tree view the field is. Specify 0 not to use the field as part of the key. Every level of a tree view must have at least one key.

For example to create a tree view where the first level would consist of employee number and surname, you would set the Level property of both columns to 1. You would not want to display the employee number so you would set its DisplayPosition to 0, but because you would use it as the tree view key to ensure the uniqueness of the entries, you would set its KeyPosition to 1. (If you use more than one field as the tree view key, you use the KeyPosition to assign their relative order.)

The Surname column would not be part of the key, so you would set its KeyPosition 0, but to display it you would set its DisplayPosition to 1.

After you have created your tree view, use the SELECT and ADD_ENTRY commands to fill it.

To see what properties items in a tree view can have, refer to CurrentItem Property.

The images preceding tree view items can be assigned using the image properties of the tree view column or of the individual tree view items. Refer to CurrentItem Property.

Tree View Properties

Tree View Method

Tree View Event


Tree View Properties

Checkboxes property

ComponentVersion property

EntriesAtRoot property

HasButtons property

HasLines property

LinesAtRoot property

ManageChildren property

MultipleSelectStyle property

Level property

ValueAt Property


Checkboxes property

Use the CheckBoxes property to add checkboxes to the tree view.

The check boxes are displayed when the property is set to True.

The check box is selected when the user clicks on it or when the Checked property of the item is set programmatically. To find out if an item in the tree view has been selected, use the Checked property of the item.

Clicking on the check box triggers an ItemChanged event for the tree view.

You can disable the check box for an item using the CheckEnabled property.


ComponentVersion property

Use the ComponentVersion property to indicate which LANSA version of the component is to be used.

0 indicates versions prior to LANSA 10.0.

1 indicates LANSA version 10.0 or later. If you choose this value the component may not function with earlier LANSA versions.

2 indicates LANSA version 11.0 or later. If you choose this value the component may not function with earlier LANSA versions.

The ComponentVersion property is available for components which have been enhanced and which may not be compatible with earlier versions of LANSA.

With ComponentVersion 1 the Alternate color, ItemBackColor and ItemForeColor defined in a VisualStyle are displayed for a tree view.

In addition in ComponentVersion 1 the DLT_ENTRY command will trigger an ItemLostFocus event.

With ComponentVersion 2 the ItemBackColor and ItemForeColor defined in a tree item's VisualStyle are displayed for a tree view.


EntriesAtRoot property

EntriesAtRoot shows how many items a tree view has.

Use the EntriesAtRoot property to find out how many entries there are at the root of the tree view. This is a read-only property.

To find out how many entries are in a particular node of a tree view use the HasChildren property of that particular item (node).


HasButtons property

HasButtons shows/hides the + and - signs

Use the HasButtons property to display or hide the + and - icons which indicate whether tree view items contain other items.


HasLines property

HasLines shows/hides the tree view lines

Use the HasLines property to display or hide the lines shown on the tree view.


ManageChildren property

ManageChildren controls what happens when a tree item is collapsed.

The ManageChildren property controls whether child items are automatically deleted when a tree item is collapsed. It will typically be used when the children are loaded during an ItemExpanding event. It can be set to True or False.


Level property

Level controls how list is sorted

Use the Level property to specify on what level of the tree view the field is to be displayed.

Level 1 is the highest. You can have more than one field on the same level.


ValueAt Property

Access the value of an unlevelled Tree View item.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

COLUMN

Integer index of Column to be accessed.

Example

#Value := #TreeV1.ValueAt<#RowIdx #ColIdx>


LinesAtRoot property

LinesAtRoot shows/hides lines at the root level of the tree

Use the LinesAtRoot property to display or hide the lines on the root level of the tree view.


MultipleSelectStyle property

LinesAtRoot sets multiple selection on or off

Use the MultipleSelectStyle property to control how multiple tree items can be selected.

The property can be set to:

  • All: Multiple select is allowed on any item.
  • SameParent: Only items with same parent as focus item can be selected.
  • SameLevel. Only items at same level as focus can be selected.


Tree View Method

CollapseAll method

SetValue Method

StartLabelEdit method


CollapseAll method

Use the CollapseAll method to collapse all the expanded levels in a tree.

This example collapses all expanded levels in #trvw_1:

Invoke Method(#trvw_1.Collapseall)


SetValue Method

Set the value of an unlevelled Tree View item.


StartLabelEdit method

Use the StartLabelEdit method to initiate the editing of the label text of a tree view item.


Tree View Event

Expand Item Parameter

ItemExpanding Event

ItemCollapsed Event


Expand Item Parameter

Set the ExpandItem parameter FALSE to perform some action from the doubleclick other than expand.

For example, in the LANSA editor if you doubleclick on a file it opens the file. This parameter is used to ensure that the TreeItem does not also expand.


ItemExpanding Event

ItemExpanding is the event of tree view showing the next level entries

The ItemExpanding event occurs when the tree view is about to be expanded to show the next level of entries. It is typically used to load the data for this level.

The following example shows how to use this event together with the Level property:

DEFINE FIELD(#LEVEL) TYPE(*DEC) LENGTH(7) DECIMALS(0) DESC('Tree View Item level')

EVTROUTINE HANDLING( #TRVW_1.ItemExpanding )
change #level #Trvw_1.CurrentItem.Level
case #level
when '= 1'
select (#section #secdesc) from_file(sectab) with_key(#deptment)
add_entry #trvw_1
endselect
when '= 2'
select (#empno #surname #givename) from_file(pslmst1) with_key(#deptment #section)
add_entry #trvw_1
endselect
endcase
ENDROUTINE


ItemCollapsed Event

ItemCollapsed is the event of a tree view closing up a level of entries

The ItemCollapsed event occurs when the tree view has been closed up to hide a level of entries. It is typically used to save any changed or new entries.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

COLUMN

Integer index of Column to be set.

VALUE

Value to be set.

Example

#TreeV1.SetValue( 1 1 "tv1" )


TreeItem

TreeItem Properties

TreeItem Methods


TreeItem Properties

Bold property

Checked property

CheckEnabled property

ChildrenCount property

CheckReadOnly

Expanded property

HasChildren property

HasLines property

Level property

MarginBottom property

MarginTop property

ParentItem property

Position property

Tree property

ValueAt Property


Bold property

Use the Bold property to control whether a tree view item is displayed as bold text.

This code sets the current item in a tree view to bold:

Set #trvw_1.CurrentItem Bold(True)


ChildrenCount property

Read-only property.

Use the ChildrenCount property to find out how many subordinate entries a tree view entry has.


HasChildren property

Use the HasChildren property to specify whether a tree view entry has subordinate entries. The value of this property can be Unknown, No, or Yes.


HasLines property

Use the HasLines property to display or hide the lines shown on the tree view item.


ParentItem property

A run-time property.

Use the ParentItem property to return or set the parent item of a tree view item.


Level property

Level tells the level of tree view items

Read-only property.

Use the Level property to check the level of a tree view item. The following code performs different actions depending on the level of the current item:

if '#treeview.currentitem.level *eq 1'

execute new_dept
else
if '#treeview.currentitem.level *eq 2'
execute new_sect
else
if '#treeview.currentitem.level *eq 3'
execute new_empl
endif
endif
endif


Expanded property

Use the Expanded property to control or check whether a tree view item is expanded or collapsed. The value of this property can be either True or False.


CheckEnabled property

Use the CheckEnabled property to control whether the check box for a tree item is enabled.

This code disables the check box for the current item in a tree:

Set Com(#trvw_1.CurrentItem) CheckEnabled(False)


CheckReadOnly

Makes items in a checkbox write protected.

Use this property to disable or enable the editing of an item's checkbox.


Checked property

Use the Checked property to control whether the check box for a tree item is ticked.

The value of this property can be True, False or Grayed.

This code selects the check box for the current item in the tree:

Set Com(#trvw_1.CurrentItem) Checked(True)


Tree property

The Tree property is the tree view to which this item belongs.

This code returns the name of the tree view of the item:

Set Com(#std_descs) Value(#trvw_1.CurrentItem.Tree.name)


MarginBottom property

MarginBottom allows more spacing under a tree item

Use the MarginBottom property to increase the bottom margin under a tree view item. The margin is specified in pixels.

Usually you do not need to change the automatic spacing provided by the tree view, but in some cases adjusting the margins gives a better visual effect.

Copy and paste this code to see how top and bottom margins of tree view are changed:

FUNCTION options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(313) Clientwidth(568) Formposition(ScreenCenter) Left(336) Top(133) Width(576)
Define_Com Class(#PRIM_TRVW) Name(#TRVW_1) Displayposition(1) Height(289) Left(24) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(289)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_1) Keyposition(1) Level(1) Parent(#TRVW_1) Source(#DEPTMENT) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_3) Keyposition(1) Level(2) Parent(#TRVW_1) Source(#SECTION) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_2) Displayposition(1) Image(#VI_DEPTCL) Imageexpanded(#VI_DEPTOP) Level(1) Parent(#TRVW_1) Source(#DEPTDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_4) Displayposition(1) Image(#VI_SECTCL) Imageexpanded(#VI_SECTOP) Level(2) Parent(#TRVW_1) Source(#SECDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_5) Keyposition(1) Level(3) Parent(#TRVW_1) Source(#EMPNO) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_6) Displayposition(1) Image(#VI_EMPLOY) Level(3) Parent(#TRVW_1) Source(#SURNAME)
Define_Com Class(#STD_NUM.Visual) Name(#STD_NUM) Caption('Bottom margin of current item:') Displayposition(2) Height(19) Labeltype(Caption) Left(344) Parent(#COM_OWNER) Tabposition(2) Top(40) Usepicklist(False) Width(182)
Define_Com Class(#STD_NUM.Visual) Name(#STD_NUM_1) Caption('Top margin of current item:') Displayposition(3) Height(19) Labeltype(Caption) Left(344) Parent(#COM_OWNER) Tabposition(3) Top(16) Usepicklist(False) Width(185)
EVTROUTINE handling(#TRVW_1.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#EMPNO #SURNAME #DEPTMENT #SECTION) from_file(PSLMST)
FETCH fields(#DEPTDESC) from_file(DEPTAB) with_key(#DEPTMENT)
FETCH fields(#SECDESC) from_file(SECTAB) with_key(#DEPTMENT #SECTION)
ADD_ENTRY to_list(#TRVW_1)
ENDSELECT
ENDROUTINE
EVTROUTINE HANDLING(#STD_NUM_1.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#TRVW_1.CurrentItem) Margintop(#std_num_1.value)
ENDROUTINE
EVTROUTINE HANDLING(#STD_NUM.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#TRVW_1.CurrentItem) MarginBottom(#std_num.value)
ENDROUTINE
END_COM


MarginTop property

MarginTop allows more spacing above a tree item

Use the MarginTop property to increase the Top margin above a tree view item. The margin is specified in pixels.

Usually you do not need to change the automatic spacing provided by the tree view, but in some cases adjusting the margins gives a better visual effect.


Position property

Position allows the repositioning of a tree item

Use the Position property to change the position of a tree item in its level

The position of a tree item can only be changed for ViewStyle(Unlevelled) tree view's and when the tree view does not have a sort column.


ValueAt Property

Access the value of an unlevelled Tree View item.

RESULT

Variant value of the list element

COLUMN

Integer index of Column to be accessed.

Example

#treeItem1 := #Tree1.Items<1>.ValueAt(2)


TreeItem Methods

List item Collapse method

List item Expand method

SetValue Method


List item Collapse method

Use the Collapse method to programmatically collapse a tree item which has been expanded.


List item Expand method

Use the Expand method to programmatically expand an item in a tree.

Copy and paste this code to see how the Expand and Collapse methods work:

FUNCTION options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(316) Clientwidth(408) Formposition(ScreenCenter) Height(343) Left(444) Top(128) Width(416)
Define_Com Class(#PRIM_TRVW) Name(#TRVW_1) Displayposition(1) Height(289) Left(24) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(289)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_1) Keyposition(1) Level(1) Parent(#TRVW_1) Source(#DEPTMENT) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_3) Keyposition(1) Level(2) Parent(#TRVW_1) Source(#SECTION) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_2) Displayposition(1) Image(#VI_DEPTCL) Imageexpanded(#VI_DEPTOP) Level(1) Parent(#TRVW_1) Source(#DEPTDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_4) Displayposition(1) Image(#VI_SECTCL) Imageexpanded(#VI_SECTOP) Level(2) Parent(#TRVW_1) Source(#SECDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_5) Keyposition(1) Level(3) Parent(#TRVW_1) Source(#EMPNO) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_6) Displayposition(1) Image(#VI_EMPLOY) Level(3) Parent(#TRVW_1) Source(#SURNAME)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Expand') Displayposition(2) Height(17) Left(320) Parent(#COM_OWNER) Tabposition(2) Top(8)
Define_Com Class(#PRIM_PHBN) Name(#PHBN_2) Caption('Collapse') Displayposition(3) Height(17) Left(320) Parent(#COM_OWNER) Tabposition(3) Top(32)
EVTROUTINE handling(#TRVW_1.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#EMPNO #SURNAME #DEPTMENT #SECTION) from_file(PSLMST)
FETCH fields(#DEPTDESC) from_file(DEPTAB) with_key(#DEPTMENT)
FETCH fields(#SECDESC) from_file(SECTAB) with_key(#DEPTMENT #SECTION)
ADD_ENTRY to_list(#TRVW_1)
ENDSELECT
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_1.Click)
Invoke Method(#TRVW_1.CurrentItem.Expand)
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_2.Click)
Invoke Method(#TRVW_1.CurrentItem.Collapse )
ENDROUTINE
END_COM


SetValue Method

Set the value of an unlevelled Tree View item.

RESULT

Boolean indicating if set was successful (TRUE)

COLUMN

Integer index of Column to be set.

VALUE

Value to be set.

Example

#TreeV1.Items<2>.SetValue ( 1 "tv1" )


Column of a List-Type Component

A column is a column in a list, combo box, tree view, grid, graph or multi-line edit box. It represents a field in the Repository.

You can use the various properties of the column to set attributes such as its position and the sort order of its items.

Column of a List-Type ComponentProperties

Column of a List-Type Component Events

Column of a List-Type Component Methods


Column of a List-Type ComponentProperties

CaptionAlign property

CaptionText

CaptionType property

Checkboxes property

ColumnAlign property

ColumnRole property

DisplayAppearance property

DisplayPosition property

EditAppearance property

Editor property

KeyPosition property

Level property

MinimumWidth property

ReadOnly

RowAlign method

SelectOnClick property

SortAsColumn property

SortDirection property

SortOnClick property

SortPosition

SortType

Source

ValueAt Property

WidthType


RowAlign method

Use the RowAlign method to specify the vertical alignment for the contents of a grid item.

Its value can be Top, Center and Bottom.

SelectOnClick property

SortAsColumn property

SortDirection property

SortOnClick property

SortPosition


SelectOnClick property

SelectOnClick controls whether the column is selected

Use the SelectOnClick property to specify whether the current item in a grid column can be selected by clicking on its header. This property can have a value of True or False.


SortAsColumn property

SortAsColumn controls the column used for sorting

Use the SortAsColumn property to specify another column to be used to sort this column.

In some instances you may want the sorting of a column to be based on another column (which does not need to be visible). For example if a column is showing dates in DDMMYYYY format you would probably want the sorting to be based on a column with the dates in format YYYYMMDD.

You can cut and paste this example to see how the SortAsColumn property works:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(166) Clientwidth(468) Height(193) Left(364) Top(167) Visible(False) Width(476)
Define_Com Class(#PRIM_LTVW) Name(#LTVW_1) Columnbuttonheight(21) Componentversion(1) Displayposition(1) Height(121) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(16) Width(449)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_1) Displayposition(1) Parent(#ltVW_1) Readonly(False) Sortonclick(True) Source(#YYYYMMDD) Width(32)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_2) Displayposition(2) Parent(#ltVW_1) Sortonclick(True) Source(#STD_TEXT) Width(19)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_3) Displayposition(3) Parent(#ltVW_1) Sortonclick(True) Source(#DDMMYYYY) Width(33) Widthtype(Remainder)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_1) Caption('Sort third column as YYYYMMDD') Displayposition(2) Height(15) Left(248) Parent(#COM_OWNER) Tabposition(2) Top(144) Width(209)
Evtroutine Handling(#com_owner.Initialize)
Change Field(#std_text) To(NSW)
Change Field(#ddmmyyyy) To(01012001)
Change Field(#yyyymmdd) To(20010101)
Add_Entry To_List(#LTVW_1)
Change Field(#std_text) To(VIC)
Change Field(#ddmmyyyy) To(03042004)
Change Field(#yyyymmdd) To(20040304)
Add_Entry To_List(#LTVW_1)
Change Field(#std_text) To(TAS)
Change Field(#ddmmyyyy) To(02022005)
Change Field(#yyyymmdd) To(20050202)
Add_Entry To_List(#LTVW_1)
Change Field(#std_text) To(WA)
Change Field(#STD_NUM) To(4)
Change Field(#ddmmyyyy) To(06072000)
Change Field(#yyyymmdd) To(20000606)
Add_Entry To_List(#LTVW_1)
Endroutine
EVTROUTINE HANDLING(#CKBX_1.Click)
if cond('#ckbx_1.buttonstate *eq Checked')
Set Com(#LVCL_3) Sortascolumn(#LVCL_1)
else
Set Com(#LVCL_3) Sortascolumn(*null)
endif
ENDROUTINE
End_Com


SortDirection property

SortDirection controls how list is sorted.

Use the SortDirection property to specify whether the list is to be sorted in ascending or descending order.


SortOnClick property

SortOnClick controls whether the column is sorted

Use the SortOnClick property to specify whether the column can be sorted by clicking on its header. This property can have a value of True or False.

If SortOnClick is True, a click on the column header sets the SortPosition of this column to 1 making it the major sorting column. A second click on the column header reverses the current sort order, so if the column is initially sorted in an ascending order, the click changes the sort order to descending and vice versa.


SortPosition

SortPosition determines the place of this column in the sort order

Use the SortPosition property to control the place of the column in the sort hierarchy of the list or grid.

The grid is sorted first by the column with a SortPosition of 1, then by the column with a SortPosition of 2 etc. To exclude a column from the sort, make its SortPosition 0.

The SortPosition is changed at runtime if the user clicks on a column with SortOnClick(True) making the SortPosition of this column 1. SortPosition can also be changed programmatically.


Source

The Source property displays the field which was used to create this column.


ReadOnly

ReadOnly makes items write protected.

Use the ReadOnly property to disable or enable the editing of items.

Note that you can override the ReadOnly setting of the column for individual items using the item's ReadOnly property.

Note also that this property only applies to the first column in a list view, the other list view columns do not allow editing regardless of the value of the ReadOnly property.


WidthType

Use the WidthType property to specify how the width of a column is specified. This property can have the following values:

Characters: the width of the column is specified as a number of characters based on an average character size.

Fixed: the width of the column is scaled as a percentage of the entire grid or list view and its width is frozen so that when the entire grid or list view is resized, the width of this column will not change. Use this value for fixed size fields. A Fixed width type does not freeze the column width; the user can still resize the column.

Pixels: The width of the column is specified as pixels for exact sizing.

Scaleable: the width of the column is scaled as a percentage of the entire grid or list view. When the entire list or a grid is resized, the column is resized accordingly.

Remainder: the column takes up whatever space is left unused in the grid or list view. You should specify the largest column of your grid or list view as remainder. Note that this value is not designed to be used in the first column on the left.

MinRemainder: the column takes up whatever space is left unused and the column's minimum width is specified as a percentage in the Width parameter.

The recommended approach is to specify all fixed-size fields with a column WidthType Fixed or Pixels, the largest field with a column WidthType MinRemainder and the rest of the columns as Scaleable.


SortType

Use the SortType property to specify how the contents of a column is to be sorted.

This property can have the following values:

Word: In a word sort, all punctuation marks and other non-alphanumeric characters, except for the hyphen and the apostrophe, come before any alphanumeric character. The hyphen and the apostrophe are treated differently to the other non-alphanumeric symbols, in order to ensure that words such as "coop" and "co-op" stay together within a sorted list.

String: In a string sort, the hyphen and apostrophe are treated just like any other non-alphanumeric character, and they come before the alphanumeric characters.

Word is the most commonly used type of sort.

Level property


CaptionAlign property

Use the CaptionAlign property to set the position of the caption. The caption can be aligned to the left or right or it can be centered.


CaptionType property

Use the CaptionType property to specify what kind of caption is used as the header for a column. The type can be:

Description: the description specified in the field definition is used.

Caption: the text entered in the Caption property of the column are used.


CaptionText

The following TreeView, Grid, ListView and PropertySheet components publish a CaptionType property:

#PRIM_TVCL

#PRIM_GRID

#PRIM_LTVW

#PRIM_PRCL

A CaptionText property is published on these components to access the caption (for example, column heading).

Example

The following example yields "Employee Number"

Define_Com Class(#PRIM_TBSH) Name(#listSheet) Caption('List') Displayposition(4) Height(319) Left(4) Parent(#tabFolder) Tabposition(4) Tabstop(False) Top(22) Width(569)
Define_Com Class(#PRIM_LTVW) Name(#ListV1) Componentversion(2) Displayposition(1) Fullrowselect(True) Height(297) Keyboardpositioning(SortColumn) Left(8) Parent(#listSheet) Showsortarrow(True) Tabposition(1) Top(16) Width(553)
Define_Com Class(#PRIM_LVCL) Name(#listCol1) Displayposition(1) Parent(#ListV1) Source(#EMPNO)
#listCol1.CaptionText


Checkboxes property

Use the Checkboxes property to turn on or off the display of check boxes for all items in this column.

You can control the display check boxes for individual items using the item's Checkboxes property.

Copy and paste the following sample application to see how you can specify check boxes for columns and items in a tree view:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Check Box Tester') Clientheight(585) Clientwidth(413) Height(619) Left(300) Top(108) Width(421)

* Tree & Column Definition

Define_Com Class(#PRIM_TRVW) Name(#TREE) Displayposition(4) Height(241) Left(8) Parent(#COM_OWNER) Tabposition(4) Top(64) Width(393)

Define_Com Class(#PRIM_TVCL) Name(#COL1) Displayposition(1) Image(#VI_DEPTCL) Imageexpanded(#VI_DEPTOP) Keyposition(1) Level(1) Parent(#TREE) Sortposition(1) Source(#DEPTMENT)

Define_Com Class(#PRIM_TVCL) Name(#COL2) Displayposition(1) Image(#VI_SECTCL) Imageexpanded(#VI_SECTOP) Keyposition(1) Level(2) Parent(#TREE) Sortposition(1) Source(#SECTION)

Define_Com Class(#PRIM_TVCL) Name(#COL3) Displayposition(1) Image(#VI_EMPLOY) Keyposition(1) Level(3) Parent(#TREE) Sortposition(1) Source(#EMPNO)

* Tracing Definition

Define_Com Class(#PRIM_PHBN) Name(#CLEAR) Buttondefault(True) Caption('Clear') Displayposition(2) Left(8) Parent(#COM_OWNER) Tabposition(3) Top(4) Width(393)

Define_Com Class(#PRIM_PHBN) Name(#LOAD) Caption('Load') Displayposition(1) Left(8) Parent(#COM_OWNER) Tabposition(2) Top(32) Width(393)

* Sheet & Page Definition

Define_Com Class(#PRIM_TAB) Name(#SHEET) Displayposition(3) Height(265) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(312) Width(393)

Define_Com Class(#PRIM_TBSH) Name(#PAGE_COL) Caption('Columns') Displayposition(1) Height(239) Left(4) Parent(#SHEET) Tabposition(1) Tabstop(False) Top(22) Width(385)

* Columns Tab

Define_Com Class(#PRIM_GPBX) Name(#GPBX_DEPT) Caption('Department') Displayposition(3) Height(58) Left(8) Parent(#PAGE_COL) Tabposition(3) Tabstop(False) Top(32) Width(361)

Define_Com Class(#PRIM_GPBX) Name(#GPBX_SECT) Caption('Section') Displayposition(2) Height(58) Left(8) Parent(#PAGE_COL) Tabposition(2) Tabstop(False) Top(96) Width(361)

Define_Com Class(#PRIM_GPBX) Name(#GPBX_EMPNO) Caption('Employee') Displayposition(1) Height(58) Left(8) Parent(#PAGE_COL) Tabposition(1) Tabstop(False) Top(160) Width(361)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_DEPT_CHK) Caption('Check boxes') Displayposition(1) Left(16) Parent(#GPBX_DEPT) Tabposition(1) Top(16) Width(89)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_SECT_CHK) Caption('Check boxes') Displayposition(1) Left(16) Parent(#GPBX_SECT) Tabposition(1) Top(16) Width(97)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_EMPNO_CHK) Caption('Check boxes') Displayposition(1) Left(16) Parent(#GPBX_EMPNO) Tabposition(1) Top(16) Width(97)

* Items Tab

Define_Com Class(#PRIM_TBSH) Name(#PAGE_ITEMS) Caption('Items') Displayposition(2) Height(239) Left(4) Parent(#SHEET) Tabposition(2) Tabstop(False) Top(22) Width(385)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_ITEM_CHECKBOX) Caption('Check boxes') Displayposition(3) Left(16) Parent(#PAGE_ITEMS) Tabposition(3) Top(32) Width(97)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_ITEM_CHECKED) Caption('Checked') Displayposition(2) Left(16) Parent(#PAGE_ITEMS) Tabposition(2) Top(56) Width(97)

Define_Com Class(#PRIM_CKBX) Name(#CKBX_ITEM_CHKENABLED) Caption('Check box enabled') Displayposition(1) Left(16) Parent(#PAGE_ITEMS) Tabposition(1) Top(80) Width(201)

Define_Com Class(#PRIM_LABL) Name(#LABL_1) Caption('Clear and reload the tree to set check boxes for columns.') Displayposition(4) Height(15) Left(8) Parent(#PAGE_COL) Tabposition(4) Tabstop(False) Top(8) Width(361)

Define_Com Class(#PRIM_LABL) Name(#LABL_2) Caption('Set check box options for individual items in the tree.') Displayposition(4) Height(15) Left(16) Parent(#PAGE_ITEMS) Tabposition(4) Tabstop(False) Top(16) Width(329)

Evtroutine Handling(#CLEAR.Click)

Clr_List Named(#TREE)

Endroutine

Evtroutine Handling(#LOAD.Click)

* Load the Tree View

Select Fields(#TREE) From_File(PSLMST)

Add_Entry To_List(#TREE)

Endselect

Endroutine

* ===========================================================================================

*

* Form Initialization

*

* ===========================================================================================

Evtroutine Handling(#com_owner.CreateInstance)

Set Com(#com_owner) Caption(*component_desc)

* Load the Tree View

Select Fields(#TREE) From_File(PSLMST)

Add_Entry To_List(#TREE)

Endselect

Endroutine

* ===========================================================================================

*

* Handlers

*

* ===========================================================================================

Evtroutine Handling(#CKBX_DEPT_CHK.Click)

If Cond('#CKBX_DEPT_CHK.buttonstate = Checked')

Set Com(#COL1) Checkboxes(True)

Else

Set Com(#COL1) Checkboxes(False)

Endif

Endroutine

Evtroutine Handling(#CKBX_SECT_CHK.Click)

If Cond('#CKBX_SECT_CHK.buttonstate = Checked')

Set Com(#COL2) Checkboxes(True)

Else

Set Com(#COL2) Checkboxes(False)

Endif

Endroutine

Evtroutine Handling(#CKBX_EMPNO_CHK.Click)

If Cond('#CKBX_EMPNO_CHK.buttonstate = Checked')

Set Com(#COL3) Checkboxes(True)

Else

Set Com(#COL3) Checkboxes(False)

Endif

Endroutine

Evtroutine Handling(#CKBX_ITEM_CHECKBOX.Click)

If_Ref Com(#TREE.CurrentItem) Is_Not(*NULL)

If Cond('#CKBX_ITEM_CHECKBOX.buttonstate = Checked')

Set Com(#TREE.currentitem) Checkboxes(True)

Else

Set Com(#TREE.CURRENTITEM) Checkboxes(False)

Endif

Endif

Endroutine

Evtroutine Handling(#CKBX_ITEM_CHKENABLED.Click)

If_Ref Com(#TREE.CurrentItem) Is_Not(*NULL)

If Cond('#CKBX_ITEM_CHKENABLED.buttonstate = Checked')

Set Com(#TREE.currentitem) Checkenabled(True)

Else

Set Com(#TREE.CURRENTITEM) Checkenabled(False)

Endif

Endif

Endroutine

Evtroutine Handling(#CKBX_ITEM_CHECKED.Click)

If_Ref Com(#TREE.CurrentItem) Is_Not(*NULL)

If Cond('#CKBX_ITEM_CHECKED.buttonstate = Checked')

Set Com(#TREE.currentitem) Checked(True)

Else

Set Com(#TREE.CURRENTITEM) Checked(False)

Endif

Endif

Endroutine

End_Com


ColumnAlign property

Use the ColumnAlign property to specify whether the contents of a column are left-aligned, centered or right-aligned.

Note that this property does not have any effect in the first column of a list view which is always left-aligned


ColumnRole property

Use the ColumnRole property to specify the role the column is to play.

In a graph, a column can be used either as a label or as a data column. Text fields are used as labels and numeric fields are used as the data to be graphed.

A pie chart can only display two columns of data, one label and one data. In bar and line charts there can be several data columns but only one label column.

In a multi-line edit box, the column can be used as data or it can be a column containing the line number or the line continuation number.

The column defined as the line continuation number is used to record the order of strings that make up a line when a line has to be split up because the field is shorter than the line.

Usually it is best to make other than data columns invisible or position them after the data column so that the user will not try to enter text in other columns than data columns.


DisplayAppearance property

DisplayAppearance controls how the column is displayed

Use the DisplayAppearance property to determine how the items in the column are displayed.

The value for this property can be:

Checkboxes. The items in the column are preceded by a check box.

Edit. The items in the column are displayed as an edit box.

MultilineEdit. The items in the column are displayed as a multiline edit box.

Image. The items in the column are images.

ImageAndText. The items in the column have an image and a caption.

Default. The DisplayAppearance of the items is automatically determined by the visualizations in the component definition of the field on which the column is based.

For example if the field visualization is:

  • Picklist with Appearance(CheckBox) then Default will be a check box
  • Picklist with Appearance(Images) then Default will be Images
  • Picklist with Appearance(ImagesAndText) then Default will be ImagesAndText
  • Picklist with Appearance(DropDown) then Default will be a ComboBox +

Note that DisplayAppearance CheckBoxes, Image and ImageAndText can only be used when the field on which the column based on contains a picklist in its component definition.

In a list view DisplayAppearance only applies when the ViewStyle is Report.

DisplayAppearance does not apply to the columns in a tree view.


DisplayPosition property

Use the DisplayPosition of a list, tree view or grid column to specify the order in which columns inside it are displayed.

Note that columns with the Visible property set to False have a DisplayPosition of 0.


EditAppearance property

EditAppearance controls how the column is displayed

Use the EditAppearance property to determine how the items in the column are displayed when being edited.

Note that you must set the ReadOnly property of the column to False to allow the editing of the items.

The value for this property can be:

Checkboxes. The item being edited is preceded by a check box.

Default. The EditAppearance of the items is automatically determined by the visualizations in the component definition of the field on which the column is based.

Edit. The item being edited is displayed as an edit box.

Image. The item being edited is shown as an image.

ImageAndText. The item being edited has an image and a caption.

Multiline edit. The item being edited is displayed as an edit box (only available in grid).

ReusablePart. A reusable part is displayed for the item for the editing. Specify the name of the reusable part in the EditorPart property.

SpinEdit. The item being edited is displayed in a spin edit box.

For example if the field visualization is:

  • SpinEdit then Default will be a SpinEdit
  • Picklist with Appearance(CheckBox) then Default will be a check box
  • Picklist with Appearance(Images) then Default will be Images
  • Picklist with Appearance(ImagesAndText) then Default will be ImagesAndText
  • Picklist with Appearance(DropDown) then Default will be a ComboBox

Note that EditAppearance CheckBoxes, Image and ImageAndText can only be used when the field on which the column based on contains a picklist in its component definition.

In a list view EditAppearance only applies when the ViewStyle is Report.


KeyPosition property

KeyPosition controls how list is sorted

Use the KeyPosition property to specify what part of the tree view key this column is. The tree view key is specific to a particular Level in the tree view, and every level must have at least one key unless it is the lowest level in the hierarchy.

The tree view key is used to ensure that the entries in the tree view are unique. Typically fields such as employee numbers, product numbers and order numbers are used as the key.

Specify 0 not to make the field part of the tree view key.

Specify 1 if this is the only field to be used as the key.

If you are using more than one field as the key, specify their relative order.


Editor property

Editor provides access to the EditorManager component

The Editor property provides access to the EditorManager component which manages the editing for the column.

At design-time you can change the editing properties of the column (such as DisplayAppearance and EditAppearance) directly, but at run-time you need use the EditorManager to change these properties.

The properties set on the column provide the default values for the EditorManager at run-time.

Double-click on the Editor property in the tree on the left to display the help text for EditorManager.


MinimumWidth property

Use the MinimumWidth property to specify the minimum width for a column. If you set this property to 0, the user can resize the column so that it is not visible.

If the WidthType is Character, this value is expressed as number of characters. For the other WidthTypes, this value is expressed as a percentage.


ValueAt Property

Columnar views like ListBox, GridView, ComboBox, Graphs and unlevelled TreeViews have a ValueAt property to allow a display string to be retrieved.

Values can be read from columnar views by referencing a row.

RESULT

Variant value of the list element

ROW

Integer index of Row to be accessed.

Example

#Value := #TreeV1.columns<1>.ValueAt( 3 )


Column of a List-Type Component Events

GotFocus Event

GotFocusAccept event

GotSelection Event

GotSelectionAccept event

LostFocus Event

LostFocusAccept event

LostSelection Event

LostSelectionAccept event


GotFocus Event

The GotFocus event is triggered when the focus is moved to an item in this column Moving focus between the items inside the column does not trigger this event.


GotFocusAccept event

The GotFocusAccept event is triggered when an item in this column gets focus.

The GotFocusAccept event differs from the GotFocus event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the programmer more control over what the user does. Whenever something is about to change the programmer is asked whether or not they accept the change before the operation continues.


GotSelection Event

The GotSelection event is triggered when the selection is moved to an item in this column. Moving selection between the items inside the column does not trigger this event.


GotSelectionAccept event

The GotSelectionAccept event is triggered when an item in this column is selected.

The GotSelectionAccept event differs from the GotSelection event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the programmer more control over what the user does. Whenever something is about to change the programmer is asked whether or not they accept the change before the operation continues.


LostFocus Event

The LostFocus event is triggered when the focus is moved away from an item in this column. Moving focus between the items inside the column does not trigger this event.


LostFocusAccept event

The LostFocusAccept event is triggered when an item in this column loses focus.

The LostFocusAccept event differs from the LostFocus event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the programmer more control over what the user does. Whenever something is about to change the programmer is asked whether or not they accept the change before the operation continues.


LostSelection Event

The LostSelection event is triggered when the selection is moved away from an item in this column. Moving selection between the items inside the column does not trigger this event.


LostSelectionAccept event

The LostSelectionAccept event is triggered when an item in this column loses selection.

The LostSelectionAccept event differs from the LostSelection event in that it gives you control to proceed or not to proceed with this event. If you set the Accept parameter of this event to False, the event will not proceed.

For example if you have focus in a grid cell and you move the focus to another cell, these events are triggered:

  • Item LostFocusAccept and ItemLostSelectionAccept for the first cell. And if the new cell is in a different column, LostFocusAccept and LostSelectionAccept for the first column.
  • ItemGotFocusAccept and ItemGotSelectionAccept for the second cell. And if the new cell is in a different column, GotFocusAccept for and GotSelectionAccept for the second column.

If Accept is set to False for any of these events, the operation is cancelled. If Accept is set to True for all of them, these events will proceed:

  • Item LostFocus andItemLostSelection for the first cell, as well as LostFocus and LostSelection for the first column.
  • ItemGotFocus and ItemGotSelection for the second cell, as well as GotFocus and GotSelection for the second column.

The purpose of Accept processing is to give the programmer more control over what the user does. Whenever something is about to change the programmer is asked whether or not they accept the change before the operation continues.


Column of a List-Type Component Methods

SetValue Method


SetValue Method

Columnar views like ListBox, GridView, ComboBox, Graphs and unlevelled TreeViews have a SetValue() method to allow a display string to be assigned.

Values can be inserted into columnar views by referencing the rows and columns.

RESULT

Boolean indicating if set was successful (TRUE)

ROW

Integer index of Row to be set.

VALUE

Value to be set.

Examples

#TreeV1.columns<1>.SetValue ( 3 "tv1" )

#Grid1.columns<1>.SetValue ( 3 "31" )


EditorManager component

EditorManager manages the editing of the column at run-time

Use the EditorManager component to change the editing properties of the column at run-time.

At design-time you can change the editing properties of the column (such as DisplayAppearance and EditAppearance) directly, but at run-time you need use the EditorManager to change these properties.

The properties set on the column at design-time provide the default values for the EditorManager.

EditorManager component Properties

EditorManager component Methods


EditorManager component Properties

EditorPart property

ShowDropDown property

ShowPrompt property


EditorPart property

EditorPart is the reusable part used to edit the column

Use the EditorPart property to specify the name of a reusable part which will be used to edit the column.

Typically you would create an editor part when the grid column does not offer adequate functionality to edit the value.

For example, to have a drop-down of values the contents of which will change depending on the value of another column or component, you cannot use field visualization because the contents of a picklist cannot be changed dynamically. In this case you can create a reusable part that contains a combo box and method routines that can be used to change the contents of the combo box dynamically.

Set the EditAppearance property to ReusablePart to display the editor part.


ShowDropDown property

ShowDropDown controls whether a drop-down list is displayed

Use the ShowDropDown to override the default visualization for the column.

LANSA determines a default visualization of the column based on the visualizations present in the source field's component definition.

You can change this visualization to a drop-down list by setting the ShowDropDown property to True.


ShowPrompt property

ShowPrompt controls whether a prompt is displayed

Use the ShowPrompt to override the default visualization for the column.

LANSA determines a default visualization of the column based on the visualizations present in the source field's component definition.

You can change this visualization to a prompt by setting the Showprompt property to True.


EditorManager component Methods

Prompt method

DisplayPosition property

MinimumWidth property


Prompt method

Use the Prompt method to display the prompter for the current cell editor.

Invoking this method is the same as the user pressing F4.


Basic List item

List item is an entry in a list box, list view, combo box, tree view or grid.

List items are run-time components. You can manipulate list items using either the CurrentItem or the FocusItem properties of a list, combobox, tree view or grid.

CurrentItem is the item currently being processed in the application. The user can set the CurrentItem by selecting an item in a list. CurrentItem can also be set programmatically using the GET_ENTRY or SELECTLIST commands.

FocusItem is the item which has the focus on the desktop. The user can set the FocusItem by moving the focus on a list item. FocusItem can also be set programmatically by setting the Focus property of the CurrentItem to True.

FocusItem and CurrentItem are often the same, but they can be different for example when the application processes list items in the background without changing the FocusItem on the desktop.

Properties

Checkboxes property

Checked Property

CheckEnabled property

CurrentItem Focus Property

CurrentItem Position Property

CurrentItem Selected Property

EnsureVisible Property

Entry Property

FirstVisible Property

RelatedReference property


EnsureVisible Property

Use the EnsureVisible property to make sure that a list item is visible in a list view, list box, combo box, tree view or a. grid, or a grid column is visible in a grid.

This code ensures that the current item in a combo box is visible:

Set #Cmbx_1.CurrentItem EnsureVisible(True)


Checked Property

Use the Checked property to control and to find out whether the check box in front of the item has been selected. The Checked property can be set to True, Grayed or False.


Checkboxes property

Use the Checkboxes property to turn on or off the display of a check box for the item.

You can also use the Checkboxes property of the column to control the display of check boxes for all the items in the column.

In this example event routine the check box is hidden when the item is deselected:

Evtroutine Handling(#CKBX_ITEM_CHECKBOX.Click)

If_Ref Com(#TREE.CurrentItem) Is_Not(*NULL)
If Cond('#CKBX_ITEM_CHECKBOX.buttonstate = Checked')
Set Com(#TREE.currentitem) Checkboxes(True)
Else
Set Com(#TREE.CURRENTITEM) Checkboxes(False)
Endif
Endif
Endroutine


Entry Property

A read-only property.

Use the Entry property to find out the entry number of a list item in a list.

You may want to record the number of an item so that you can keep track of it when, for example, other items are added to the list or when lists are sorted. This code records the entry number of a list item in a field:

CHANGE FIELD(#eno) TO(#Ltvw_1.CurrentItem.Entry)

Lists do not automatically set the selection on any particular item when they are loaded. To set the selection on a particular item, use the GET_ENTRY command to specify the entry number and then set the selection:

Get_Entry Number(3) From_List(#Ltvw_1)

Set #Ltvw_1.CurrentItem Selected(True)


FirstVisible Property

Use the FirstVisible property to make sure that an item is positioned as the first item in a grid.

This code esures that the current item in a grid is positioned as the first item in a grid:

Set #Grid_1.CurrentItem FirstVisible(True)


CurrentItem Focus Property

Use the Focus property to find out if a list, grid, combobox or tree view item or a grid column has the focus or to set the focus on an item or a column. Only one item or column at a time can have the Focus property set to True.

You can use the SELECTLIST command to examine the properties of every item in a list. For example the following code goes through the list making one item at a time the CurrentItem and tests whether its Focus property is set to true:

SELECTLIST NAMED(#LTVW_1)

IF '#ltvw_1.CurrentItem.Focus *eq True'
do something
ENDIF
ENDSELECT

In lists where it is not possible to select more than one entry at a time (tree view, combo box, and list box), the Focus and Selected properties have always the same value. In other words Setting the Focus property of a list item to True will automatically set its Selected property to True.

In lists which allow for multiple selection, only one item can have the focus (Focus property set to True), but multiple items can be selected (usually by using the Ctrl and Shift keys).

For a FocusItem the Focus property is always set to True.


CurrentItem Position Property

Use the Position property of a list or grid item to find out in which position of the list or grid it is displayed.

The following code shows the position of items in a grid in the field #STD_NUM. You can copy and paste the code to a form.

FUNCTION options(*DIRECT)

BEGIN_COM role(*EXTENDS #PRIM_FORM) HEIGHT(289) LEFT(346) TOP(213) WIDTH(392)
DEFINE_COM class(#PRIM_GRID) name(#GRID_1) COLUMNBUTTONHEIGHT(18) COLUMNBUTTONPRESS(True) DISPLAYPOSITION(1) HEIGHT(201) LEFT(32) PARENT(#COM_OWNER) SHOWBUTTONSELECTION(False) SHOWSELECTION(True) SHOWSORTARROW(True) TABPOSITION(1) TOP(16) WIDTH(321)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SOURCE(#EMPNO) WIDTH(36)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SURNAME) WIDTH(65)
DEFINE_COM class(#STD_NUM.Visual) name(#STD_NUM) DISPLAYPOSITION(2) HEIGHT(19) LEFT(32) PARENT(#COM_OWNER) TABPOSITION(2) TOP(232) WIDTH(262)
EVTROUTINE handling(#COM_OWNER.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#GRID_1) from_file(PSLMST)
ADD_ENTRY to_list(#GRID_1)
ENDSELECT
ENDROUTINE
EVTROUTINE handling(#GRID_1.ItemGotFocus) options(*NOCLEARMESSAGES *NOCLEARERRORS)
CHANGE field(#STD_NUM) to('#GRID_1.CURRENTITEM.POSITION')
ENDROUTINE
END_COM


RelatedReference property

Use the RelatedReference property to store an object against an item in a list. This allows you to navigate from the list item to a user defined object.

The following example consists of a reusable part for displaying employee information and a form that uses this part for displaying the details for the current item in a grid. You can copy and paste this code:

Reusable part GRID_REF:
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_PANL) Displayposition(1) Left(0) Tabposition(1) Top(0)
Define_Pty Name(p_Employee) Get(*auto #empno) Set(*auto #empno)
Define_Pty Name(p_Surname) Get(*auto #Surname) Set(*auto #Surname)
Define_Pty Name(p_Givename) Get(*auto #Givename) Set(*auto #Givename)
Mthroutine Name(Show_details)
Use Builtin(MESSAGE_BOX_ADD) With_Args(#EMPNO)
Use Builtin(MESSAGE_BOX_ADD) With_Args(#GIVENAME)
Use Builtin(MESSAGE_BOX_ADD) With_Args(#SURNAME)
Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK INFORMATION 'Employee details')
Endroutine
End_Com
The form:
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(422) Left(310) Top(108) Width(510)
* Grid Definition
Define_Com Class(#PRIM_GRID) Name(#GRID_1) Captionnoblanklines(True) Columnbuttonheight(20) Displayposition(1) Height(322) Left(8) Parent(#COM_OWNER) Showbuttonselection(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(7) Width(385)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_1) Displayposition(1) Parent(#GRID_1) Source(#EMPNO) Width(37)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_2) Displayposition(2) Parent(#GRID_1) Source(#SURNAME) Width(36)
Define_Com Class(#PRIM_GDCL) Name(#GDCL_3) Displayposition(3) Parent(#GRID_1) Source(#GIVENAME) Width(27)
Define_Com Class(#GRID_REF) Name(#temp_employee) Reference(*dynamic)
Define_Com Class(#PRIM_STBR) Name(#STBR_1) Displayposition(2) Height(24) Left(0) Messageposition(1) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(371) Width(502)
Evtroutine Handling(#com_owner.CreateInstance)
Set Com(#com_owner) Caption(*component_desc)
Select Fields(#GRID_1) From_File(PSLMST)
Set_Ref Com(#temp_employee) To(*create_as #GRID_REF)
Set Com(#temp_employee) P_Employee(#empno) P_Surname(#surname) P_Givename(#givename)
Add_Entry To_List(#GRID_1)
Set Com(#grid_1.currentitem) Relatedreference(#temp_employee)
Set_Ref Com(#temp_employee) To(*null)
Endselect
Endroutine
Evtroutine Handling(#GRID_1.DoubleClick) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set_Ref Com(#Temp_employee) To(*dynamic #grid_1.currentitem.relatedreference)
Invoke Method(#Temp_employee.Show_details)
Endroutine End_Com


CurrentItem Selected Property

Use the Selected property to find out if a list, grid, combo box or tree view item or a grid column has been selected or to set the selection on an item or a column.

You can use the SELECTLIST command to examine the properties of every item in a list. For example the following code goes through the list making one item at a time the CurrentItem and tests whether its Selected property is set to true:

SELECTLIST NAMED(#LTVW_1)

IF '#ltvw_1.CurrentItem.Selected *eq True'
do something
ENDIF
ENDSELECT

In lists which allow for multiple selection, several items can be selected, either programmatically or by the user using the Ctrl and Shift keys.

The following code sets the selection on list view items with entry numbers from 10 to 15. The SelectionStyle of the list view has been set to Multiple:

SELECTLIST NAMED(#LTVW_1)
IF cond('(#ltvw_1.CurrentItem.entry *ge 10) *and (#ltvw_1.CurrentItem.entry *le 15)')
Set #Ltvw_1.CurrentItem Selected(True)
ENDIF
ENDSELECT


CheckEnabled property

Use the CheckEnabled property to control whether the check box for a list item is enabled.

This code disables the check box for the current item in a list view:

Set Com(#ltvw_1.CurrentItem) CheckEnabled(False)


Basic Bar

This should not be displayed. This component exists only to provide a single source for common properties/events/methods of progress and track bars.

MinimumValue property

MaximumValue property

Value property


MinimumValue property

MinimumValue sets the first value of the scale in progress and track bars. It is used together with MaximumValue to set the scale.

In a track bar, the MinimumValue property sets the first tick mark and the MaximumValue property sets the last tick mark. The MinimumValue and MaximumValue have to be withing the range of 2 signed bytes (MIN=-32767 MAX=32767).

In a progress bar, the MinimumValue and MaximumValue properties set the range for the duration of the entire process.


MaximumValue property

MaximumValue sets the last value of the scale in progress and track bars. It is used together with MinimumValue to set the scale.

In a track bar, the MinimumValue property sets the first tick mark and the MaximumValue property sets the last tick mark. The MinimumValue and MaximumValue have to be withing the range of 2 signed bytes (MIN=-32767 MAX=32767).

In a progress bar, the MinimumValue and MaximumValue properties set the range for the duration of the entire process.


Value property

Value sets or returns the position of the slider in a track bar.

In a progress bar it returns or sets a value indicating an operation's progress toward completion. Note that incrementing Value doesn't change the appearance of the progress bar by its exact value.

Value is always in the range between Minimum and Maximum values.


Progress bar

Use a progress bar to show the progress of a lengthy operation. The progress bar is gradually filled with chunks from left to right as the operation progresses.

Use the MinimumValue and MaximumValue properties to set the range for the duration of the entire process. The Value property indicates the current value of the progress bar.

For example if you were processing 10 files, you would set the MinimumValue to 0 and the MaximumValue to 10, and increase the value by 1 every time a file is processed so that the bar would be filled when the last file is processed.

The following code first makes the progress bar visible and sets the initial position of the indicator to 1. It then initializes the #loopcount variable to 0. During the loop the progress bar value is set to the current value of the loop counter (which will be in the range 1 to 10). Finally the progress bar is hidden.

set #progbar value(1) visible(true)
change #loopcount 1
begin_loop using(#loopcount) to(10)
set #progbar value(#loopcount)
end_loop
set #progbar visible(false)


Trackbar

A track bar is a window containing a slider and optional tick marks. It is useful when you want to select a discrete value or a set of consecutive values in a range.

The user can move the slider by dragging it, clicking the mouse to either side of the slider, or using the keyboard.

To set the value of a track bar to 10 you would enter:

set #trackbar value(10)

To write code for the different values of a track bar you could define a field #value for storing the track bar value and write a CASE statement like this:

change #value #Tkbr_1.value

case #value
when '= 1'
do something
when '= 2'
do something else
when '= 3'
do something else
endcase

LineSize property

Orientation property

PageSize property

TickFrequency property

TickMark property

TickStyle property


LineSize property

LineSize specifies the increments in which the slider on the track bar moves when the keyboard arrow keys are pressed.

The default line size is 1.


Orientation property

The Orientation property controls whether a bar is positioned vertically or horizontally.


PageSize property

PageSize specifies the increments in which the slider on the track bar moves when either the Page Up and Page Down keys are pressed or the track bar is clicked with the mouse.

The default page size is 5.


TickFrequency property

TickFrequency controls the frequency of tick marks on a track bar in relation to its MinimumValue and MaximumValue. For example, if the range is from 0 to 10, and this property is set to 2, there will be one tick for every 2 increments in the range.


TickMark property

TickMark controls on which side of the line ticks are placed in a track bar.

This property can have the following values:

BottomRight: Tick marks are positioned along the bottom of track bar if it is oriented horizontally, or along the right side if it is oriented vertically.

TopLeft: Tick marks are positioned along the top of the track bar if it is oriented horizontally, or along the left side if it is oriented vertically.

Both: Tick marks are positioned on both sides or top and bottom of the track bar.


TickStyle property

TickStyle controls how the ticks appear in a track bar.

This property can have the following values:

Auto: Tick marks appear on the track bar as specified in MinimumValue, MaximumValue and TickFrequency properties.

Manual: Currently not supported

None: No tick marks appear on the track bar.


Group box

A group box provides an identifiable grouping for components.

You can use a group box to subdivide a form visually, for example to separate groups of fields. You can also use it functionally, for example to group radio buttons which are mutually exclusive.


Image

An Image component is used to display a picture file.

There are two ways you can specify the image to be displayed: using the Image property or the Filename property. The Image property is used to specify a repository-enrolled bitmap whereas the Filename property can be used to specify an image file in any of these formats:

.bmp

.gif (also animated gif)

.jpeg

.tga

.pcx

.sgi

.tif

Use the Image property when you use the Image control to display an image that rarely changes, such as a company logo or a standard picture used in many applications. It is best to store images like this in the repository so that they can be easily found and updated.

Use the FileName property to specify images that are part of the data processed in your application.

AutoSize property

Format property

FileName property

ImageAlignment property


AutoSize property

Use the Autosize property to determine whether a picture is adjusted to the size of the image control.

Note that if you are adding both text and an image on a toolbar button, you need to set AutoSize to false.


Format property

Format specifies the type of file used in an image. The value of this property can be GIF, JPEG, PCX, TGA, BMP or SGI.


FileName property

Use the FileName property to specify the name of the file containing the picture.

The image you specify is displayed at design-time. However, when you save the component, the filename property is blanked out and the image is no longer shown. This is because the image component is designed to be used to display images programmatically.

For example this code sets the image to correspond to the value of the EMPNO field:

Evtroutine Handling(#Form_12.Initialize)

Case Of_Field(#EMPNO)
When Value_Is('= A1234')
Set Com(#imge_1) Filename('C:\My Documents\pictA1234.bmp')
...


ImageHeight

The ImageHeight property shows the original height of the picture.


ImageWidth

The ImageWidth property shows the original width of the picture.


ImageAlignment property

LPVOIMAGEIMAGEALIGNMENTHELP

The ImageAlignment property is used to determine the position of the image in the image control. The values of this property can be TopLeft, TopCenter, TopRight, CenterLeft, Center, CenterRight, BottomLeft, BottomCenter, BottomRight, and Stretch.

Please note that the ImageAlignment property is ineffective when the AutoSize property is set to true.


Basic Video

Not to be displayed.

FileName property

ImageHeight

ImageWidth


FileName property

Use the FileName property to specify the name of the file containing the .avi file.


Video

Use video to specify a multimedia file to play.

VideoStopped event

Video panel

FrameBackward method

FrameForward method

Play method

Stop method

CycleToStart property


VideoStopped event

The VideoStopped event is triggered when the video is stopped.


Video panel

Use a video panel to allow the user to rewind and replay a multimedia file. Conceptually, this component is a set of buttons similar to those of a video recorder.


FrameBackward method

The FrameBackward method moves the video back a frame.


FrameForward method

The FrameForward method moves the video forward a frame.


Play method

The Play method starts the video.


Stop method

The Stop method stops the video.


CycleToStart property

Set the CycleToStart property to True to automatically cycle the video to the start after it has ended.


Sound

A Sound component is used to play a sound file.

FileName property


FileName property

Use the FileName property to specify the name of the file containing the sound file.


Status bar

Information area on the bottom of the window.

Use a status bar to create a window at the bottom of a form through which your application can display various kinds of information.

You can display information and status messages (MESSAGE TYPE *INFO or *STATUS) on the status bar. Also, all validation messages issued by I/O modules are automatically shown in the status bar.

Information messages are displayed in the status bar until a new event routine is invoked. If more than one information message is issued, the user can scroll through them.

Status messages are displayed in the status bar as an operation progresses. When the event routine that issued the messages ends, the last message is erased.

All I/O validation messages are displayed automatically in the status bar. To view the second level help text, click on the message shown in the status bar.

An easy way of using the status bar is to run the VL_BBSTSBR template (in Edit menu, choose the Use Template Wizard option). It puts a status bar on your form and also creates two subroutines, one for sending information messages (infmessage) and one for sending status messages (stsmessage).

You can also put other controls inside the status bar, such as images or combo boxes simply by drag-and-drop. You could, for example, add an animated .gif image in the status bar and control it using its Visible property.

When you have other controls inside the status bar use the status bar's Message Position property and the other controls' DisplayPosition property to determine the order in which they are displayed on the status bar.

For example, you could have two image controls on the status bar. To display them in this order: Image_1, message area, Image_2, you would set the DisplayPosition of Image_1 to 1, the MessagePosition of the status bar to 2, and the DisplayPosition of Image_2 to 3.

LayoutStyle property

MessagePosition property


LayoutStyle property

LayoutStyle sets the style of the status bar.

Use the LayoutStyle property to control how two or more items are placed on the status bar. LayoutStyle can be:

Attach - the items are placed so that they fill the status bar from both ends.

Flow - the items are placed one after the other starting from the right.


MessagePosition property

MessagePosition determines where messages are shown.

When you have other controls inside the status bar use the status bar's Message Position property and the other controls' DisplayPosition property to determine the order in which they are displayed on the status bar.

For example, you could have two image controls on the status bar. To display them in this order: Image_1, message area, Image_2, you would set the DisplayPosition of Image_1 to 1, the MessagePosition of the status bar to 2, and the DisplayPosition of Image_2 to 3.


Tab folder

Tab Folder properties

Tab folder Events

Folder with several tab sheets.

Use a Tab folder to to create a folder with several sheets to provide an organized way of showing large amounts of information. First put a tab folder control on your form and then drag to it as many tab sheet controls as you need.

Apart from basic properties that govern the appearance of the tab folder, there are advanced docking, undocking and autohiding features you can use to transform a single tab folder into a tab docking application with tab sheets attached to various parts of the window. In these docking applications tab folders can be automatically hidden (autohide) and tab sheets can be moved and attached to other parts of the screen (undock and dock).

When you want to use these advanced features, the tab folder has to be managed by an attachment layout manager on a form. The structure of the tab framework is created by setting the DockPosition of individual tab sheets.

Copy and paste this code to a form to see a basic tab docking application:

Function Options(*DIRECT)
BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Sample IDE') CLIENTHEIGHT(457) CLIENTWIDTH(652) HEIGHT(484) LAYOUTMANAGER(#ATLM_1) LEFT(330) TOP(126) WIDTH(660)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) DRAGSTYLE(Automatic) DRAGTABS(True) HEIGHT(457) LEFT(0) LEFTTABWIDTH(186) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) WIDTH(652)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Outliner') DISPLAYPOSITION(1) DOCKALLOWEDPOSITIONS(Left+Bottom+Right) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(430) IMAGE(#STD_BTMAP) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(23) WIDTH(178)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Repository') DISPLAYPOSITION(2) DOCKALLOWEDPOSITIONS(Left+Bottom+Right) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(430) IMAGE(#VB_LOCK) LAYOUTMANAGER(#ATLM_1) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(23) WIDTH(178)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Design') DISPLAYPOSITION(1) HEIGHT(431) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(22) WIDTH(453)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Source') DISPLAYPOSITION(2) HEIGHT(431) LAYOUTMANAGER(#ATLM_1) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(22) WIDTH(453)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_2) DISPLAYPOSITION(1) HEIGHT(415) LEFT(0) PARENT(#TBSH_2) TABLOCATION(Bottom) TABPOSITION(1) TABSTOP(False) TOP(15) WIDTH(178)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_2) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Fields') DISPLAYPOSITION(1) HEIGHT(389) LAYOUTMANAGER(#ATLM_1) LEFT(4) OPENED(True) PARENT(#TAB_2) TABPOSITION(1) TABSTOP(False) TOP(4) WIDTH(170)

DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_6) CAPTION('Files') DISPLAYPOSITION(2) HEIGHT(389) LAYOUTMANAGER(#ATLM_1) LEFT(4) PARENT(#TAB_2) TABPOSITION(3) TABSTOP(False) TOP(4) WIDTH(170)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_7) CAPTION('Forms') DISPLAYPOSITION(3) HEIGHT(389) LAYOUTMANAGER(#ATLM_1) LEFT(4) PARENT(#TAB_2) TABPOSITION(2) TABSTOP(False) TOP(4) WIDTH(170)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#FIELDS) COMPONENTVERSION(2) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(389) LEFT(0) PARENT(#TBSH_5) SHOWSORTARROW(True) TABPOSITION(1) TOP(0) WIDTH(170)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_2) ATTACHMENT(Center) MANAGE(#FIELDS) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#FILES) COMPONENTVERSION(2) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(389) LEFT(0) PARENT(#TBSH_6) SHOWSORTARROW(True) TABPOSITION(1) TOP(0) WIDTH(170)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_3) ATTACHMENT(Center) MANAGE(#FILES) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_LTVW) NAME(#FORMS) COMPONENTVERSION(2) DISPLAYPOSITION(1) FULLROWSELECT(True) HEIGHT(389) LEFT(0) PARENT(#TBSH_7) SHOWSORTARROW(True) TABPOSITION(1) TOP(0) WIDTH(170)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_4) ATTACHMENT(Center) MANAGE(#FORMS) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_1) CAPTION('Form Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#FORMS) SOURCE(#STD_TEXT) WIDTH(99)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_2) CAPTION('File Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#FILES) SOURCE(#STD_TEXT) WIDTH(100)
DEFINE_COM CLASS(#PRIM_LVCL) NAME(#LVCL_3) CAPTION('Field Name') CAPTIONTYPE(Caption) DISPLAYPOSITION(1) PARENT(#FIELDS) SOURCE(#STD_TEXT) WIDTH(95)
DEFINE_COM CLASS(#prim_memo) NAME(#source) CURRENTLINE(1) DISPLAYPOSITION(1) HEIGHT(431) LEFT(0) MAXIMUMLINELENGTH(50) PARENT(#TBSH_3) TABPOSITION(1) TOP(0) WIDTH(453)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_5) ATTACHMENT(Center) MANAGE(#source) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_MECL) NAME(#MECL_1) COLUMNROLE(Data) DISPLAYPOSITION(1) PARENT(#source) SOURCE(#STD_TEXT)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_6) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
Evtroutine Handling(#com_owner.Initialize)
#std_text := 'ADDRESS1'
Add_Entry To_List(#FIELDS)
Set Com(#fields.CurrentItem) Image(#VI_FOLDOP)
#std_text := 'SALARY'
Add_Entry To_List(#FIELDS)
Set Com(#fields.CurrentItem) Image(#VI_FOLDOP)
#std_text := 'STD_NUM'
Add_Entry To_List(#FIELDS)
Set Com(#fields.CurrentItem) Image(#VI_FOLDOP)
#std_text := 'STD_TEXT'
Add_Entry To_List(#FIELDS)
Set Com(#fields.CurrentItem) Image(#VI_FOLDOP)
#std_text := 'PSMLST'
Add_Entry To_List(#files)
Set Com(#files.CurrentItem) Image(#VI_EMPLOY)
#std_text := 'DEPTMENT'
Add_Entry To_List(#files)
Set Com(#files.CurrentItem) Image(#VI_EMPLOY)
#std_text := 'PSLSKL'
Add_Entry To_List(#files)
Set Com(#files.CurrentItem) Image(#VI_EMPLOY)
#std_text := 'FORM1'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM2'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM3'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM4'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM5'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM6'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM7'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM8'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM9'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM10'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM11'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM12'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM13'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM14'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'FORM15'
Add_Entry To_List(#forms)
Set Com(#forms.CurrentItem) Image(#STD_ICON)
#std_text := 'Function Options(*DIRECT)'
Add_Entry To_List(#source)
#std_text := ' Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(541) Clientwidth(825) Height(575) Left(340) Top(178) Width(833)'
Add_Entry To_List(#source)
#std_text := ' Define_Com Class(#PRIM_TAB) Name(#TAB_1) Displayposition(1) Docklefttabwidth(157) Height(489) Left(48) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(16) Width(713) \n End_Com'
Add_Entry To_List(#source)
#std_text := 'End_Com'
Add_Entry To_List(#source)
Endroutine
End_Com


Tab Folder properties

BottomAllowAutoHide property

BottomAutoHide property

BottomTabHeight property

BottomTabLocation property

BottomViewStyle property

DragTabs property

LeftAllowAutoHide property

LeftAutoHide property

LeftTabLocation property

LeftTabWidth property

LeftViewStyle property

RightAllowAutoHide property

RightAutoHide property

RightTabLocation property

RightTabWidth property

RightViewStyle property

TopAllowAutoHide property

TopAutoHide property

TopTabHeight property

TopTabLocation property

TopViewStyle property

FixedWidth property

TabLocation property

TabLayout property

TabStyle property

MultiLine property

RaggedRight property

OpenPage property

TabHeight property

TabWidth property

ViewStyle property

ShowPageTabs property

LeftShowPageTabs property

TopShowPageTabs property

BottomShowPageTabs property

RightShowPageTabs property


BottomAllowAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomAllowAutoHide property to specify whether or not the tab folder can be automatically hidden (autohide) when its tabsheets are attached to the bottom of the window (see the DockPosition property of tab sheets).

When using autohide, the tab folder is automatically hidden when the user clicks on the Attach button (a pin icon) in the top right corner of a tab sheet. When the tab folder is hidden, only the tabs of the tab sheets are shown. The tab folder appears again when the user clicks on a tab. To end autohiding, the user clicks again on the Attach button.

When this property is set to true, the Attach button appears on all the tab sheets in the tab folder to allow the user to activate autohide.

To see how autohide works, click on the Attach button in the Repository tab of the LANSA editor or copy and paste this code to a form:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(474) TOP(136) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) BOTTOMTABHEIGHT(141) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Bottom) HEIGHT(112) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Bottom) HEIGHT(112) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(203) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(203) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(203) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
End_Com


BottomAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomAutohide property to programmatically autohide the tab folder to the bottom of the screen or to find out whether the tab folder has been autohidden.

The value of this property can be True or False.

Note that this property has no effect at design time to make it easier to design an autohide tab folder.


BottomTabHeight property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomTabHeight property to specify the height position of the split divider when the tab folder is not in autohide mode.

Copy and paste this code to a form to see how this property works:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(474) TOP(136) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) BOTTOMTABHEIGHT(141) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Bottom) HEIGHT(112) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Bottom) HEIGHT(112) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(203) LEFT(4) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(203) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(203) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Change BottomTabHeight') DISPLAYPOSITION(1) LEFT(152) PARENT(#TBSH_3) TABPOSITION(1) TOP(64) WIDTH(209)
EVTROUTINE HANDLING(#PHBN_1.Click)
set #tab_1 BottomTabHeight(250)
ENDROUTINE
End_Com


BottomTabLocation property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomTabLocation property to specify on which side the tabs are displayed when a tab folder is attached to the bottom of the window.

Tab sheets are attached using the DockPosition property.


BottomViewStyle property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomViewStyle property to control how the tabs of a tab folder attached to the bottom of the window are displayed. You can choose between Tabs and Stacked views.


DragTabs property

Use this property to specify whether tab sheet position can be changed visually with the mouse.

When the DragTabs property is Ture, you can move tab sheet positions by holding down the mouse and dragging.


LeftAllowAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftAllowAutoHide property to specify whether or not the tab folder can be automatically hidden (autohide) when its tab sheets are attached to the left (see the DockPosition property of tab sheets).

When using autohide, the tab folder is automatically hidden when the user clicks on the Attach button (a pin icon) in the top right corner of a tab sheet. When the tab folder is hidden, only the tabs of the tab sheets are shown. The tab folder appears again when the user clicks on a tab. To end autohiding, the user clicks again on the Attach button.

When this property is set to true, the Attach button appears on all the tab sheets in the tab folder to allow the user to activate autohide.

To see how autohide works, click on the Attach button in the Repository tab of the LANSA editor or copy and paste this code to a form:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Docking Framework Sample') Clientheight(378) Clientwidth(549) Height(405) Layoutmanager(#ATLM_1) Left(208) Top(151) Width(557)
Define_Com Class(#PRIM_TAB) Name(#TAB_1) Displayposition(1) Height(378) Left(0) Lefttabwidth(154) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(0) Visualstyle(#VS_TAB) Width(549)
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#TAB_1) Parent(#ATLM_1)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_1) Caption('Page1') Displayposition(1) Dockallowundock(True) Dockclosebutton(True) Dockposition(Left) Height(349) Left(4) Opened(True) Parent(#TAB_1) Tabposition(1) Tabstop(False) Top(25) Width(146)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_2) Caption('Page2') Displayposition(2) Dockallowundock(True) Dockclosebutton(True) Dockposition(Left) Height(349) Left(4) Parent(#TAB_1) Tabposition(2) Tabstop(False) Top(25) Width(146)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_3) Caption('Page3') Displayposition(1) Height(349) Left(4) Opened(True) Parent(#TAB_1) Tabposition(3) Tabstop(False) Top(25) Width(382)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_4) Caption('Page4') Displayposition(2) Height(349) Left(4) Parent(#TAB_1) Tabposition(2) Tabstop(False) Top(25) Width(382)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_5) Caption('Page5') Displayposition(3) Height(349) Left(4) Parent(#TAB_1) Tabposition(1) Tabstop(False) Top(25) Width(382)
End_Com


LeftAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftAutohide property to programmatically autohide the tab folder to the left of the screen or to find out whether the tab folder has been autohidden.

The value of this property can be True or False.

Note that this property has no effect at design time to make it easier to design an autohide tab folder.


LeftTabLocation property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftTabLocation property to specify on which side the tabs are displayed when a tab folder is attached to the left hand side of the window.

Tab sheets are attached using the DockPosition property.


LeftTabWidth property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftTabWidth property to specify the width position of the split divider when the tab folder is not in autohide mode.

Copy and paste this code to see the effect of LeftTabWidth:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(347) TOP(148) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(146)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(146)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Change LeftTabWidth') DISPLAYPOSITION(1) LEFT(88) PARENT(#TBSH_3) TABPOSITION(1) TOP(167) WIDTH(201)
EVTROUTINE HANDLING(#PHBN_1.Click)
set #tab_1 LeftTabWidth(300)
ENDROUTINE
End_Com


LeftViewStyle property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftViewStyle property to control how the tabs of a tab folder attached to the left are displayed . You can choose between Tabs and Stacked views.

Tab sheets are attached using the DockPosition property.


RightAllowAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the RightAllowAutoHide property to specify whether or not the tab folder can be automatically hidden (autohide) when its tab sheets are attached to the right (see the DockPosition property of tab sheets).

When using autohide, the tab folder is automatically hidden when the user clicks on the Attach button (a pin icon) in the top right corner of a tab sheet. When the tab folder is hidden, only the tabs of the tab sheets are shown. The tab folder appears again when the user clicks on a tab. To end autohiding, the user clicks again on the Attach button.

When this property is set to true, the Attach button appears on all the tab sheets in the tab folder to allow the user to activate autohide.

To see how autohide works, click on the Attach button in the Repository tab of the LANSA editor or copy and paste this code to a form:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(426) TOP(147) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) RIGHTTABWIDTH(149) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Right) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(141)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Right) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(141)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(349) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(387)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(387)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(387)
End_Com


RightAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the RightAutohide property to programmatically autohide the tab folder to the right of the screen or to find out whether the tab folder has been autohidden.

The value of this property can be True or False.

Note that this property has no effect at design time to make it easier to design an autohide tab folder.


RightTabLocation property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the RightTabLocation property to specify on which side the tabs are displayed when a tab folder is attached to the right hand side of the window.

Tab sheets are attached using the DockPosition property.


RightTabWidth property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

The RightTabWidth property to specify the width position of the split divider when the tab folder is not in autohide mode.

Copy and paste this code to a form to see the effect of the RightTabWidth property:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(426) TOP(147) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) RIGHTTABWIDTH(149) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Right) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(141)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Right) HEIGHT(349) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(141)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(349) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(387)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(387)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(387)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Change RightTabWidth') DISPLAYPOSITION(1) LEFT(89) PARENT(#TBSH_3) TABPOSITION(1) TOP(154) WIDTH(216)
EVTROUTINE HANDLING(#PHBN_1.Click)
set #tab_1 RightTabWidth(300)
ENDROUTINE
End_Com


RightViewStyle property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the RightViewStyle property to control how the tabs of a tab folder attached to the right are displayed. You can choose between Tabs and Stacked views.

Tab sheets are attached using the DockPosition property.


TopAllowAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopAllowAutoHide property to specify whether or not the tab folder can be automatically hidden (autohide) when its tab sheets are attached to the top of the window (see the DockPosition property of tab sheets).

When using autohide, the tab folder is automatically hidden when the user clicks on the Attach button (a pin icon) in the top right corner of a tab sheet. When the tab folder is hidden, only the tabs of the tab sheets are shown. The tab folder appears again when the user clicks on a tab. To end autohiding, the user clicks again on the Attach button.

When this property is set to true, the Attach button appears on all the tab sheets in the tab folder to allow the user to activate autohide.

To see how autohide works, click on the Attach button in the Repository tab of the LANSA editor or copy and paste this code to a form:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(474) TOP(136) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) BOTTOMTABHEIGHT(141) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Top) HEIGHT(71) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Top) HEIGHT(71) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(244) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(244) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(244) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
End_Com


TopAutoHide property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopAutohide property to programmatically autohide the tab folder to the top of the screen or to find out whether the tab folder has been autohidden.

The value of this property can be True or False.

Note that this property has no effect at design time to make it easier to design an autohide tab folder.


TopTabHeight property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopTabHeight property to specify the height position of the split divider when the tab folder is not in autohide mode.

Copy and paste this code to a form to see the effect of the TopTabHeight property:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(474) TOP(136) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) BOTTOMTABHEIGHT(141) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(2) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Top) HEIGHT(71) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(1) DOCKALLOWUNDOCK(True) DOCKCLOSEBUTTON(True) DOCKPOSITION(Top) HEIGHT(71) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(244) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(244) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(541)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(244) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(541) DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Change TopTabHeight') DISPLAYPOSITION(1) LEFT(136) PARENT(#TBSH_3) TABPOSITION(1) TOP(88) WIDTH(220)
EVTROUTINE HANDLING(#PHBN_1.Click)
set #tab_1 TopTabHeight(200)
ENDROUTINE
End_Com


TopTabLocation property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopTabLocation property to specify on which side the tabs are displayed when a tab folder is attached to the top of the window.

Tab sheets are attached using the DockPosition property.


TopViewStyle property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopViewStyle property to control how the tabs of a tab folder attached to the top are displayed. You can choose between Tabs and Stacked views.

Tab sheets are attached using the DockPosition property.


FixedWidth property

FixedWidth specifies that all the tabs should have the same width.

Set the FixedWith property to True to make the width of all the tabs the same.

Specifying a value for the TabWidth property will also make all the tabs the same width.


TabLocation property

Use the TabLocation property to specify on which side the of the tab folder tabs are displayed. By default tabs are set on top.


TabLayout property

Use the TabLayout property to specify the layout of the tab.

Centered means that the image and the caption are centered on the tab.

Icon left means the icon is justified to the left of the tab and the caption is centered in the remaining space.

CaptionLeft means both the icon and the caption are left justified.

IconLeft and CaptionLeft only apply when the tabs are of fixed size.


TabStyle property

Use the TabStyle property to specify how the tabs are displayed. You can choose from tabs, buttons or flat buttons.


MultiLine property

Set the MultiLine property to true to allow the captions of the tab sheets to be displayed on several lines.


RaggedRight property

Use the RaggedRight property to control how tab sheets are displayed when the MultiLine property has been set to True.

When the RaggedRight property is set to False, the tab sheets are adjusted so that they fill the entire tab. When it is set to True, the width of the tab sheets is determined by their caption.


OpenPage property

OpenPage is the topmost tab sheet in the tab folder.

A run-time read-only property.

The OpenPage property indicates which tab sheet is currently topmost in the tab. See also the Opened property of tab sheet.

This code puts the name of the currently open tab sheet in #TAB_1 to edit box #Edit_3:

set com(#edit_3) value(#tab_1.OpenPage.Name)


TabHeight property

Use the TabHeight property to set the height of the area of the tab sheets where the caption is displayed.


TabWidth property

Use the TabWidth property to set the width of the area of the tab sheets where the caption is displayed.


ViewStyle property

Use the ViewStyle property to control how the tab folder is displayed. You can choose between Tabs and Stacked views.


ShowPageTabs property

ShowPageTabs indicates whether or not to show the page tab headers for the Tab

Use the ShowPageTabs property to hide the tab page headers for a Tab. This is useful when using tab docking features and you do not wish to show the headers for DockPosition(Center) tab pages.


LeftShowPageTabs property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the LeftShowPageTabs property to hide the tab page headers for all tab pages with DockPosition(Left)


TopShowPageTabs property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the TopShowPageTabs property to hide the tab page headers for all tab pages with DockPosition(Top)


BottomShowPageTabs property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the BottomShowPageTabs property to hide the tab page headers for all tab pages with DockPosition(Bottom)


RightShowPageTabs property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the RightShowPageTabs property to hide the tab page headers for all tab pages with DockPosition(Right)


Tab folder Events

TabChanging event


TabChanging event

The TabChanging event happens just before another tab sheet is displayed.

Use this event to determine what happens when the user clicks on a tab. You can use the CanChangePage parameter to stop tabs being displayed. However, be careful when you use this event not to make the behavior of the tab folder seem unpredictable to the user.

You can copy the following code to a form and compile it to see how the TabChanging event works:

BEGIN_COM CAPTION('TabChanging Event') HEIGHT(298) LEFT(372) TOP(130) WIDTH(334)

DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) HEIGHT(142) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(104) WIDTH(273)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Tab 1') DISPLAYPOSITION(1) HEIGHT(116) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(22) WIDTH(265)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Tab 2') DISPLAYPOSITION(2) HEIGHT(116) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(22) WIDTH(265)
DEFINE_COM CLASS(#PRIM_CKBX) NAME(#CKBX_1) CAPTION('Allow user to change tabs when Tab 2 is displayed') DISPLAYPOSITION(2) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(2) TOP(72) WIDTH(361)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Tab 3') DISPLAYPOSITION(3) HEIGHT(116) LEFT(4) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(22) WIDTH(265)
DEFINE_COM CLASS(#PRIM_EDIT) NAME(#EDIT_1) DISPLAYPOSITION(3) HEIGHT(21) LEFT(168) PARENT(#COM_OWNER) TABPOSITION(3) TOP(16)
DEFINE_COM CLASS(#PRIM_EDIT) NAME(#EDIT_2) DISPLAYPOSITION(4) HEIGHT(21) LEFT(168) PARENT(#COM_OWNER) TABPOSITION(4) TOP(40)
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_1) CAPTION('OpenPage parameter') DISPLAYPOSITION(5) HEIGHT(21) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(5) TABSTOP(False) TOP(22) WIDTH(139)
DEFINE_COM CLASS(#PRIM_LABL) NAME(#LABL_2) CAPTION('CanChangePage parameter') DISPLAYPOSITION(6) HEIGHT(21) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(6) TABSTOP(False) TOP(42) WIDTH(139)
* note that the parameter names cannot be repository fields or fields defined in the component;
EVTROUTINE HANDLING(#TAB_1.TabChanging) OpenPage(#TheTab) CanChangePage(#CanChange)
if cond('#TheTab.name *eq #tbsh_2.name')
if cond('#ckbx_1.ButtonState *eq Unchecked')
change #std_bool 'False'
else
change #std_bool 'True'
endif
set #CanChange value(#std_bool)
endif
set com(#edit_1) value(#TheTab.name)
set com(#edit_2) value(#CanChange);
ENDROUTINE
end_com

OpenPage parameter

CanChangePage parameter


OpenPage parameter

Use the Open Page parameter to find out which tab sheet is currently open in a tab.


CanChangePage parameter

Use the CanChangePage parameter to stop or enable tab sheets being displayed.


Tab sheet

Use a tab sheet to create a page of information to be placed on a tab folder.

Tab sheet Property

Tab sheet Events

Tab sheet Method


Tab sheet Property

Opened property


Opened property

Use the Opened property to control which tab sheet is topmost. The Opened property of the topmost tab sheet is set to True.

You can use this property programmatically to display a tab sheet:

set com(#TBSH_4) Opened(True)


Tab sheet Events

Opening event

Closing event


Opening event

The Opening event happens when a tab sheet is being brought topmost on the tab. Use this event to load data to the tab sheet to be displayed


Closing event

The Closing event the tab sheet happens when another tab sheet is being opened.


Tab sheet Method

Open method


Open method

The Open method is used to bring a tab sheet topmost on a tab.


Tab sheetToolbar

Use a toolbar to show a collection of toolbar buttons.

A toolbar contains buttons that correspond to items in an application's menu, providing a graphic interface for the user to access an application's most frequently used functions and commands.


Visual style

Visual Style sets fonts and colors.

Use a visual style to create common styles to be shared by several other components. The visual style component controls style elements such as background color and font. Once you have created a style, you can use it as the Visual Style property in any component. Using visual styles makes it easy to make global changes to the look of your applications.

A visual style consists of one of more visual style schemes. You define more than one scheme per style only if you are creating a multilingual application and you want to use different fonts and colors for different languages.

The scheme is used to map three types of display objects (Value, Caption and Title) to visual style items. The visual style items are font and color definitions.

An example of a visual style could be style MY_VS which would consist of one visual style scheme MY_SCHEME. This scheme defines that Value type objects (e.g. fields and lists) use visual style item Value and that Caption type objects (e.g. forms and labels) and Title objects (graph titles) use visual style item Caption. Value could use the system font and have a white background, and Caption could use a gray background.

Note that a visual style does not have complete control over how an application is displayed: windows controls such as form's title bars, scroll bars, and menus are displayed using the colors the user has set in the Windows Control Panel.

Default Property


Default Property

The Default visual style specifies the visual style used in case there is no language-specific scheme.

You can define a visual style scheme for any language defined in the partition. This is useful for example when you want to change the name of the font face name according to language.


Visual Style Scheme

In a Visual Style Scheme you can define a style (Visual Style Item) for three different objects: Values, Captions and Titles.

The style you define for Value determines how components such as the edit box of a field are displayed.

The style you define for Caption determines how components like field labels are displayed. In many styles the background color for Caption is gray.

Title sets the style for Graph titles.

When you are changing styles, make sure you understand which item affects which component type.

Values Property

Captions Property

Titles Property


Values Property

The item you define for Values determines how components such as the edit box of a field is displayed. For example very commonly the background color of the Values item is mapped to the Window background color which is usually white or another light color.

Change the properties of the Values item when you want to change the appearance of:

Combo box

Edit box

Edit box of a field

Grid cells

List box

List view

Spin edit

Tree view


Captions Property

Captions is a visual style item for forms, labels and such

The item you define for Captions determines how components like field labels are displayed. In many styles the background color for Captions is gray.

Change the properties of the Captions item when you want to change the appearance of:

Check box

Label of field

Grid headings

Group box

List view headings

Push button

Radio button

Label

Status bar

Tab folder

Tab sheet

Track bar


Titles Property

Titles defines the visual style item for graph titles.


Visual style item

The visual style item defines fonts, colors and border styles. A visual style item is mapped to a Value, Caption or Title object in a visual style scheme component.

You can use a visual style item in any number of visual style schemes. You can also use one and the same visual style item for the Value, Caption and Title objects in a scheme. However, because you normally want Value objects (for example lists and fields) to have a different background color than Caption objects (for example forms), you usually define a separate style item for both.

The value of most visual style item properties can be either a specific value such as a color 'red' or a font name 'MS Sans Serif', or it can be the the corresponding property of a system object on a particular workstation. This means that you can define, for instance, the Window background color to be always 'White' or you can define it to be whatever color the Window background on that system is. For more information refer to the NormBackColor property.

AlternBackColor property

BorderColor property

LineColor property

Bold property

BorderStyle property

ErrorBackColor property

FaceName property

FontSize property

Italic property

NormBackColor property

StrikeOut property

Script property

SQLNullBackColor property

TextColor property

Underline property


AlternBackColor property

AlternBackColor is color of every second line in a list.

Applies to list-type components only. Therefore has effect only when defined for the Value style item.

Use the AlternBackColor property to set the color of the background of every second line in a list box, or combo box. Using an alternate background color makes the list easier to read.

As with other color properties in visual styles, you can define the value as a standard color name such as 'white' or you can nominate the color of a system object. For more information about using system object colors, see the help for NormBackColor.


BorderColor property

BorderColor sets the color of grid borders.

Applies to grids only. Therefore has effect only when defined for the Value style item.

Use the BorderColor property to set the color of borders in a grid.


LineColor property

LineColor sets the color of grid lines.

Applies to grids only. Therefore has effect only when defined for the Value style item.

Use the LineColor property to set the color of lines in a grid. The default is black.


Bold property

Use the Bold property to make the font used in this style bold.


BorderStyle property

BorderStyle makes components 3D, flat etc.

Use the BorderStyle property to define how components are displayed. This property can have the following values:

3D Left--The components are shown as 3D and their left edge is shadowed.

3D Right--The components are shown as 3D and their right edge is shadowed.

None--No BorderStyle is applied.

Raised--The components are shown as 3D.

Indented--The components are shown indented.

ThickSolid--The components are shown flat with a thick border.

ThinSolid--The components are shown flat with a thin border.


ErrorBackColor property

ErrorBackColor sets the color of fields in error.

Applies to list-type, field and edit box components only. Therefore has effect only when defined for the Value style item.

Use the ErrorBackColor property to define a background color which can be used to indicate that the value entered in a field is incorrect.

You can set the ErrorBackColor programmatically with such commands as DATECHECK, VALUECHECK, RANGECHECK in BEGINCHECK/ENDCHECK blocks. The ErrorBackColor is also turned on by I/O modules. For example when a field insert, update or delete breaks the rules of the associated file the error background color is activated.

As with other color properties in visual styles, you can define the value as a standard color name such as 'white' or you can nominate the color of a system object. For more information about using system object colors, see the help for NormBackColor.


FaceName property

Use the FaceName property to specify the name of the font used.

You can use these special values to map to desktop fonts:

VL Shell maps to "MS Shell Dlg2 " for OperatingSystems Windows 2000 and later (includes XP) or "MS Shell Dlg" for NT, 95, 98.

VL System maps to the Windows System Font

VL System Fixed maps to the Windows System Fixed pitch font.


FontSize property

Use the FontSize property to set the size of the font


Italic property

Use the Italic property to make the font used italic.


NormBackColor property

Use the NormBackColor property to set the color of the background.

The value of this property can be the name of a color, the name of a windows object or an RGB value. In other words you can either define background color as a standard color (such as 'red'), a custom color (specified using a color palette and expressed as a RGB value) or you can define that it uses the same color as is used for a Windows object on a particular workstation. For example if you set the background to be Window, the color will be whatever color is used as the window background color on a particular workstation.

Remember that system colors usually vary from workstation to workstation, so to enforce certain colors you have to define them as explicit color names. If you do this, take into consideration that your chosen colors may look odd against the rest of the desktop and remember also that many windows controls such as menu fonts and colors, title bar fonts and colors and scroll bars cannot be controlled using visual styles.

To specify custom colors, click on the button with ellipses (three dots) to bring up a color palette. When you specify a custom color, it is shown as an RGB (Red,Green and Blue) value. RGB values show the amount of red, green, and blue used to achieve the color. The format is RRR:GGG:BBB. For example the value 255:255:255 is white and the value 0:0:0 is black.

You will notice that there are many system colors you can choose from. Some of them, such as Window and Window text are fairly obvious and correspond to the colors set in the Control Panel. Other Windows system colors such as ButtonFace and 3DMediumShadow are more obscure. The best way to find out what these colors look like in your application is to experiment.


StrikeOut property

StrikeOut makes text strikeout

Use the StrikeOut property to make the font used strikeout.


Script property

Script is the language your computer is set up for

Use the Script property to specify the language script for the font you have chosen. The script should correspond to the language your computer has been set up for.


SQLNullBackColor property

SQLNullBackColor property

Use the SQLNullBackColor property to change the background color of an edit field to indicate an SQLNull value.

If an Edit field has a dataclass attached and the value is assigned *SQLNull, the field's background color changes to a DarkGrey to indicate the SQLNull value. You can use SQLNullBackColor to specify a different color than the DarkGrey.

If you do not want a different background color for SQLNull values, change SQLNullBackColor to Window.


TextColor property

TextColor sets the color of text

Use the TextColor property to set the color of text.

As with other color properties in visual styles, you can define the value as a standard color name such as 'white' or you can nominate the color of a system object. For more information about using system object colors, see the help for NormBackColor.


Underline property

Underline makes the font underlined

Use the Underline property to make font used underlined.


Timer

Executes code at intervals

A Timer component executes code in the timer's Tick event at the intervals specified in the Interval property.

The following code alternately displays and hides an image at every tick of the timer:

EVTROUTINE HANDLING( #TIMR_1.Tick )

if '#imge_1.Visible *EQ true'
set #imge_1 visible(false)
else
set #imge_1 visible(true)
endif
ENDROUTINE

You include a timer in your application by dragging it to the form. However, because a timer is not a visual control it is only displayed in the Outline of the Repository Browser, not on the form.

Timer Properties

Timer Events

Timer Methods


Timer Properties

Interval Property

IsStarted Property

StartUp Property


Interval Property

Interval sets the timer interval

Use the Interval property to specify the intervals at which the Tick event of the timer is executed. Intervals are specified in milliseconds.

To stop a timer, set the Interval property to 0.

You can either set the Interval property to 0 at design time and then start it by specifying the interval value. If you specify a value greater than 0 at design time, the timer is started when the form is initialized.


IsStarted Property

Returns True if the timer is currently running


StartUp Property

Defines whether the timer is started automatically or manually.


Timer Events

Timer Tick Event


Timer Tick Event

Tick events are executed every time Interval elapses

Use the Tick event to specify the code to be executed every time the time specified in the Interval property of the timer elapses.


Timer Methods

Timer Start method

Timer Stop method


Timer Start method

Start method starts the timer

Use the Start method to start the timer. The syntax for this method is:

Invoke #TIMR_1.Start


Timer Stop method

Stop method stops the timer

Use the stop method to stop the timer. The syntax for this method is:

Invoke #Timr_1.Stop


Menu item

Menu title or menu option

Use menu items to create the options and titles in a menu.

You can drag menu items to the menu bar and to submenus. Alternatively, you can use the menu editor invoked by clicking on the dotted rectangle in the menu bar.

Checked property

Default property

GroupIndex property

MenuBreak property

RadioItem property

SubMenu property

ShortCut property

Tag property

Tip property

TipShow property

TipShowOfParent property


Checked property

Checked indicates that a menu option is selected

Use the Checked property to visually indicate that a menu option has been selected.

For example if you have a menu item for displaying a toolbar, you would make the Checked property for this item true when the toolbar is visible and false when the toolbar is not displayed.

If you have specified RadioItem(True) for a menu item, the radio button is only visible when the Checked property is True.

Copy and paste this code to see how the Checked, RadioItem and GroupIndex properties of menu items work:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Menus') Clientheight(169) Clientwidth(170) Height(215) Left(565) Menubar(#MBAR_1) Top(148) Width(178)
Define_Com Class(#PRIM_MBAR) Name(#MBAR_1) Parent(#COM_OWNER)
Define_Com Class(#PRIM_MITM) Name(#MITM_1) Caption('Menu 1') Displayposition(1) Parent(#MBAR_1)
Define_Com Class(#PRIM_SMNU) Name(#SMNU_1) Parent(#MITM_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_2) Caption('Small') Checked(True) Displayposition(1) Groupindex(1) Parent(#SMNU_1) Radioitem(True)
Define_Com Class(#PRIM_MITM) Name(#MITM_3) Caption('Large') Displayposition(2) Groupindex(1) Parent(#SMNU_1) Radioitem(True)
Define_Com Class(#PRIM_MITM) Name(#MITM_5) Caption('Menu 2') Displayposition(2) Parent(#MBAR_1)
Define_Com Class(#PRIM_SMNU) Name(#SMNU_2) Parent(#MITM_5)
Define_Com Class(#PRIM_MITM) Name(#MITM_6) Caption('Show picture') Checked(True) Displayposition(1) Parent(#SMNU_2)
Define_Com Class(#PRIM_IMGE) Name(#IMGE_1) Autosize(False) Displayposition(1) Image(#VB_PHONE) Imageheight(16) Imagewidth(16) Left(64) Parent(#COM_OWNER) Tabposition(1) Top(56)
EVTROUTINE HANDLING(#MITM_2.Click #MITM_3.Click)
If Cond(#mitm_2.checked *eq true)
Set Com(#IMGE_1) Autosize(False)
else
Set Com(#IMGE_1) Autosize(True)
ENDIF
ENDROUTINE
EVTROUTINE HANDLING(#MITM_6.Click)
If Cond(#mitm_6.checked *eq true)
Set Com(#MITM_6) Checked(False)
Set Com(#IMGE_1) Visible(False)
else
Set Com(#MITM_6) Checked(True)
Set Com(#IMGE_1) Visible(True)
ENDIF
ENDROUTINE
End_Com


Default property

Default makes a menu item the default option

Use the Default property to make a menu item the default option in a pop-up menu. The default option of a pop-up menu is invoked when the user double-clicks on the item to which the pop-up menu belongs.


GroupIndex property

Use the GroupIndex property to create a group of mutually exclusive menu options.

For example, if you have four menu options corresponding to the four different view styles of a list view (icon, smallicon, report and list), you can give all the four options the same group index (for example 1) so that only one of them can be selected at one time.

Usually mutually exclusive menu items are visualized as radio buttons using the RadioItem property of the menu item.

See also the help text for the Checked property.


MenuBreak property

MenuBreak puts the menu item in a new column.

This property can be:

  • None. The item is not in a new column.
  • Break. The item is in a new column.
  • BarBreak. The item is in a new column and it is separated from the previous item by a bar.


RadioItem property

Use the RadioItem property to make a menu item look like a radio button.

This property is used for a set of menu items which have been made mutually exclusive using the GroupIndex property.

The radio button will only appear if the Checked property is set to true.


SubMenu property

SubMenu is the submenu for this item

Use the SubMenu property to specify the name of a submenu which is to be shown for this menu item.


ShortCut property

Use the ShortCut property to specify a shortcut for a menu option or a Shortcut component.

Menu items have a Shortcut property. To assign a shortcut key to other components, you must associate them with a Shortcut component. Note that if the Menu Item is used on a PopUp Menu, the ShortCut property is ignored.

The preferred shortcut keys are function keys and Ctrl+letter combinations. It is possible to set the shortcut key to Alt+letter, but this is not recommended because as a rule Alt+letter combinations are used as the access key based on the underlined letter of the caption.

F1, Ctrl+f1 and Ctrl+Shift+F1 will always bring up the help text of your application.

It is not recommended to use PageUp and PageDown shortcut keys on menus because this will remove the availability of PageUp and PageDown features in other components such as lists, trees and multi-line edit boxes.


Tag property

Tag identifies menu items by a number

Use the Tag property to identify menu options by a number.


Tip property

Desc=Tip contains the description for the menu item

Use the Tip property to write a short description for the menu item. The tip text is displayed in the status bar when the item is selected in the menu. If the form does not contain a status bar, the tip is not shown.


TipShow property

TipShow controls whether menu item tip is shown

Use the TipShow property to control whether a menu item tip is shown in the status bar. The tip is displayed when this property is set to True.

Note that if the TipShowOfParent property is set to True, then the tip is only shown when the values of this property and the TipShow property of the parent are set to True.


TipShowOfParent property

TipShowOfParent controls whether the parents TipShow property is used

Use the TipShowOfParent property to control whether the TipShow property of the parent of the menu item is used. When this property is set to True, the TipShow property of the parent is used.


Base menu

For LANSA Product Centre's internal use only.

Base menu properties

Base menu event


Base menu properties

TipShow property


TipShow property

TipShow controls whether menu item tips are shown.

Use the TipShow property to control whether a tip is displayed in the status bar for menu items.

This property can be set to True or False. When it is set to True, menu item tips are shown.


Base menu event

Menu Prepare event


Menu Prepare event

Prepare event can be used to display context sensitive menus.

Use the Prepare event to enable\disable or insert\remove items prior to the menu activating.

For List controls, use the Prepare event to modify the pop-up menu depending on whether the column header or whether the control itself is right-clicked. This Prepare event displays different menu items when the grid #GRID is right-clicked and different items when the header of the column #GRIDCOL1 is right-clicked:

Evtroutine Handling(#GRIDpopup.Prepare) Options(*noCLEARMESSAGES *NOCLEARERRORS) Context(#CONTEXT)
If_Ref Com(#CONTEXT) Is(*equal_to #GRID)
Set Com(#GpopupITEM1) Visible(true)
Else
If_Ref Com(#CONTEXT) Is(*equal_to #GRIDCOL1)
Set Com(#GpopupITEM1) Visible(false)
Endif
Endif
Endroutine

Another way of displaying context-sensitive menus in grids, tree views and lists is to define a different pop-up menu for the control itself and a different pop-up menu or menus for the columns.

To show a context-sensitive pop-up menu for the view area (the "white space" not used by items in a control), specify its name in the Viewpop-upMenu property of the control.


Menu bar

Primary container for menu items

To create a menu, first drag a menu bar to the form. The menu bar acts as a container for menu items and submenus.

When you have dragged the menu bar to the form it appears with a rectangle with a dotted line. Click the rectangle with the mouse. This will bring up an edit box where you can enter the caption of a first-level menu item (menu title).

If you click on the rectangle again, another edit box for entering the caption for another menu title is displayed.

To add subordinate menu items to the menus, press the down arrow key after you have typed in the title. This will bring up an edit area where you can enter the caption of another menu item or create a submenu.

You can also create the menu by dragging and dropping menu items and submenus, and not use the menu editor.


Pop-up menu

A pop-up menu is displayed when the user clicks the right mouse button. Use pop-up menus to offer a quick way to access most commonly used options.

Typically a pop-up menu applies to a selected item on the desktop, such as an item in a list or a tree view. If no item is selected, you can create a pop-up menu for the form.

You specify which pop-up menu to display using the pop-upMenu property of the component.

Note that you can use the same pop-up menu with more than one component. For example in a explorer-type interface (a tree view on the left and a list view on the right), you would typically use just one pop-up menu.

Also see

Base menu properties

Base menu event

AutoActions property

Pop-up menu Events


Pop-up menu Methods

Pop-up Show method


Pop-up Show method

Use the Show method to display a pop-up menu. The pop-up menu is displayed automatically when the user right-clicks the component associated with the pop-up menu. to display the pop-up menu in another event, you can use the Show method.

In this example the Click event brings up the pop-up menu at user specified coordinates:

Evtroutine Handling(#BtnTop.Click)

Invoke Method(#BUTTONpopupMENU.Show) X(#BtnTop.SCREENLEFT) Y(#BtnTop.SCREENTOP)

Endroutine

X parameter

Y parameter


X parameter

Use the X parameter to specify the X coordinate for the display of the pop-up menu.


Y parameter

Use the Y parameter to specify the Y coordinate for the display of the pop-up menu.


Pop-up menu Events

Prepare event


Prepare event

Prepare event can be used to display context sensitive pop-up menus

Use the Prepare event to modify the pop-up menu depending on whether the column header or whether the control itself is right-clicked.

This Prepare event displays different menu items when the grid #GRID is right-clicked and different items when the header of the column #GRIDCOL1 is right-clicked:

Evtroutine Handling(#GRIDpopup.Prepare) Options(*noCLEARMESSAGES *NOCLEARERRORS) Context(#CONTEXT)

If_Ref Com(#CONTEXT) Is(*equal_to #GRID)
Set Com(#GpopupITEM1) Visible(true)
Else
If_Ref Com(#CONTEXT) Is(*equal_to #GRIDCOL1)
Set Com(#GpopupITEM1) Visible(false)
Endif
Endif
Endroutine

Another way of displaying context-sensitive menus in grids, tree views and lists is to define a different pop-up menu for the control itself and a different pop-up menu or menus for the columns.

To show a context-sensitive pop-up menu for the view area (the "white space" not used by items in a control), specify its name in the Viewpop-upMenu property of the control.

Also see

Context parameter


Context parameter

The Context parameter passes the name of the control or column that was right-clicked.


AutoActions property

AutoActions options to be automatically added to pop-up menu.

Use the AutoActions property to indicate menu options to be automatically added for a pop-up menu.

At the moment the available automatic options are cut, copy and paste. They are applicable to fields only.

For information about translating the option text, refer to the Developer Guide.


Cascading Menu Submenu

Container for menu items.

You can create a submenu by dragging and dropping this component on a selected menu item.

Alternatively, you can move the cursor on the same line as the item and press Shift + Ctrl + right arrow. An edit area is created below or to the right of the item depending on whether it is a menu title or a menu option. Use the tab key to move to this area and type in the items of the submenu.


Base graphic

For LANSA Product Centre's internal use only.


Bitmap

Bitmap is a bitmap file in the repository

Use a bitmap to specify a bitmap file to be stored as a component in the repository.

Repository-enrolled bitmaps can be used on a push-button or a toolbar button. On a push-button the bitmap can be accompanied by a caption.

The bitmap is displayed as it will be shown on a toolbar button. You can use a bitmap with a single image or bitmaps containing a separate image for all button states.

If you use a bitmap with a single image, all the four views in the Design view show this image.

If you have a bitmap with several images, you must use the ImageCount property to specify how many images the bitmap contains. The first image will then be used on a button which is not selected (button state Up), the second image will be used on a disabled button, the third image will be used on a button that has been pressed down and the fourth image will be shown on button which is kept pressed down (Checked).

For more information, refer to the ImageCount property.

ImageCount

MaskColor

UseMaskColor


ImageCount

ImageCount specifies the number of images in bitmap

The ImageCount property indicates how many images a bitmap contains. The value of ImageCount can be 1 to 4.

A bitmap containing up to four images can be used to show a different image for the four states of the button: Up, Disabled, Down and Checked.

If the bitmap only contains one image, set ImageCount to 1. At execution time LANSA will automatically determine how the image is displayed in different button states. The Design view does not reflect this so four identical buttons are displayed.

If the bitmap contains more than one image, set ImageCount to the number of images it contains. The first image is used in a button when the button is not selected (Up), the second image is used when the button is disabled, the third image is shown when the button is pressed down and the fourth image is shown when the button is kept pressed down (Checked).

The width of the bitmap must exactly divide by the ImageCount value.


MaskColor

MaskColor sets the transparent color

The MaskColor property specifies a color which will be shown as transparent (mask) in a bitmap.

For example if you specify white as the mask color of a bitmap, all white elements in it will become transparent so that the color of the button on which it is used shows through.

Use the drop-down list of values to set this property to a standard color (such as 'red'), or to the same color as is used for a Windows object on a particular workstation. For example if you set the color to be ButtonFace, the mask color will be whatever color is used as the button face color on the workstation.

Alternatively use the button with ellipses (three dots) to bring up a color palette to specify a custom color. Custom colors are expressed as RGB (Red, Green and Blue) values.


UseMaskColor

UseMaskColor control whether a mask color is applied

UseMaskColor property specifies whether a mask color specified in the MaskColor property is used.


Icon

Icon is an icon file stored in the repository

An icon component is used to store an icon file in the repository.

Repository-enrolled icons can be used in tree views, list views and forms.

In tree views and list views the icons are displayed for individial list items. An icon can precede an item, usually to show its type (Image property). In addition an icon showing the status of the list item can be shown (ImageState). In a tree view you can also specify an icon for an item that has been expanded (ImageExpanded).

Both tree views and list views also have an ImageOverlay property which can be used to superimpose another icon on the icon specified in the Image property.

In a form the icon is specified using the Icon property. It is shown in the top left corner of the form and on the task bar.

When you enrol an icon, four views of the icon are displayed:

The Small State Icon shows how the icon will be displayed if it is used as the value of the ImageState property of a tree view or a list view except when the list view's ViewStyle is set to Icon.

The Large State Icon shows how the icon will be displayed if it is used as the value of the ImageState property in a list view when the list view's ViewStyle property is set to Icon.

The Small Icon view shows how the icon will be displayed if it is used as the value of:

  • The Image, ImageExpanded and ImageOverlay properties in a tree view
  • The Image or ImageOverlay properties in a list view except when the ViewStyle property of the list view is set to Icon.
  • The Icon property for a form.

The Large Icon view shows how the icon will be displayed if it is used as the value of the Image or ImageOverlay property in a list view when the list's ViewStyle property is set to Icon.

StandardIcon property


StandardIcon property

StandardIcon lists standard icons

Use the StandardIcon property to enrol a Windows system icon in the LANSA repository.

The StandardIcon and FileName properties are mutually exclusive, in other words you can specify the image to be stored in this component either by specifying a file name and path or by specifying the name of a standard Windows icon.


Cursor

Cursor image is associated with the mouse pointer

Use a cursor to associate a graphic with the mouse pointer.

As a user moves the mouse pointer, its appearance can change to provide feedback about a state or an operation. Specify the graphic either by using the FileName property or by selecting a graphic from of the StandardCursor list.

Once you have created a cursor, you associate it with other components using the Cursor property of the component.

HotspotX property

HotspotY property

StandardCursor property


HotspotX property

HotspotX and HotspotY set cursor's active area

HotspotX specifies the part of the cursor used to target an object together with HotspotY.

Make the hotspot intuitive. For example make the hotspot of an arrow cursor the tip of the arrow.


HotspotY property

HotspotY and HotspotX set cursor's active area

HotspotY specifies the part of the cursor used to target an object together with HotspotX.

Make the hotspot intuitive. For example make the hotspot of an arrow cursor the tip of the arrow.


StandardCursor property

StandardCursor lists standard cursors

StandardCursor lists standard cursors


Elemental Visual Part

Elemental Visual Part Properties


Elemental Visual Part Properties

HintType property

LabelHorAlignment property

LabelPosition property

LabelText Property

LabelType property

LabelVerAlignment property

MarginBottom property

MarginLeft property

MarginRight property

MarginTop property

SetValue Property


HintType property

HintType specifies the type of hint used

Use the HintType property to specify what text should be displayed in the hint.

If you specify Caption, the text entered in the Hint property is used as the hint. You can also use the text of the ColumnHeadings, Description or the Label of the field definition as the hint.


MarginBottom property

MarginBottom sets the bottom margin of field

Use the MarginBottom property to specify the bottom margin of a field. Normally there is no need to adjust the margins a field but occasionally it may be necessary to adjust them to fine-tune the appearance of the application.

This property can only be specified at design-time, not when the application is running.


MarginLeft property

MarginLeft sets the left margin of field

Use the MarginLeft property to specify the left margin of a field. Normally there is no need to adjust the margins of a field but occasionally it may be necessary to adjust them to fine-tune the appearance of the application.

This property can only be specified at design-time, not when the application is running.


MarginRight property

MarginRight sets the right margin of field

Use the MarginRight property to specify the right margin of a field. Normally there is no need to adjust the margins of a field but occasionally it may be necessary to adjust them to fine-tune the appearance of the application.

This property can only be specified at design-time, not when the application is running.


MarginTop property

MarginTop sets the top margin of field

Use the MarginTop property to specify the top margin of a field. Normally there is no need to adjust the margins of a field but occasionally it may be necessary to adjust them to fine-tune the appearance of the application.

This property can only be specified at design-time, not when the application is running.


LabelPosition property

LabelPosition sets the position of labels

Use the LabelPosition property to set the position of the label relative to the field. The label can appear on the left, right, top or bottom of the field.

This property can only be specified at design-time, not when the application is running.


LabelType property

LabelType sets the type of labels

Use the LabelType property to set the type of the label. It can be the column heading, description or label specified in the field definition, or the caption entered in the Caption property of the field.

For consistency and ease-of-maintenace you should always try to use the labels derived from the field definition.


LabelHorAlignment property

LabelHorAlignment aligns labels horizontally

Use the LabelHorAlignment property to set the horizontal alignment of labels. The label can be right-aligned, centered, or left-aligned.

This property can only be specified at design-time, not when the application is running.


LabelVerAlignment property

LabelHorAlignment aligns labels vertically

Use the LabelVerAlignment property to set the vertical alignment of labels.

This property can only be specified at design-time, not when the application is running.


LabelText Property

PRIM_EVPs that publish a LabelType property also publish a LabelText property.

Example

The following example yields the string "Label Here"

Define_Com Class(#STD_TEXTL.Visual) Name(#OutputValue) Caption('Label Here') Displayposition(8) Height(20) Labeltype(Caption) Left(40) Marginleft(80) Parent(#lowerPanel) Readonly(True) Tabposition(8) Tabstop(False) Top(48) Usepicklist(False) Width(489)

#OutputValue.LabelText


SetValue Property

PRIM_EVP and PRIM_EVEF primitives can have values assigned using the SetValue() method.

If the value supplied is not legal for the data type of the targeted element (eg a string "abc" for a number), the SetValue returns LP_FALSE. If the assignment is successful, LP_TRUE is returned.

Result

Boolean indicating if set was successful (TRUE)

Value

Value to be set.

Examples

In the following examples, the various #OutputValueN are instances of #STD_TEXTL.Visual.

Define_Com Class(#PRIM_EVP) Name(#evpTmp) Reference(*DYNAMIC)

If (#STD_NUM.SetValue( "a.bc" ) <> True)

#OutputValue1 := "not a number"

Endif

#evpTmp <= #OutputValue2

#evpTmp.SetValue( "def" )


Pick List

Pick list item

Pick list Property


Pick list item

Pick list items are used in pick lists

Pick list items are used in pick lists.

Pick list item caption

Default pick list item

Pick list item value

Pick list data class


Pick list item caption

The caption of a pick list item is the text displayed in the item.


Default pick list item

The Default property specifies that this is the default item in a picklist. This property can be set to True or False.


Pick list item value

Use this property to set the Value to be returned when this pick list item is selected.

To set the visible text for the picklist item, use the Caption property.


Pick list data class

Pick lists are lists inside a property sheet.


Pick list Property

NoMatchAction property


NoMatchAction property

NoMatchAction is the action taken when a value is not found in the list

Use the NoMatchAction to set the action to be taken when an incorrect value is supplied to a picklist.

The value of a picklist has to be one of the values of its items. For example if a picklist for field #Sex has two items with values Male and Female, these two values are the only allowable values for the picklist.

If a change statement changes the value of the field to, for instance, 'Unknown', the NoMatchAction property of the Picklist governs what happens.

The NoMatch action can be:

Blanks. The value of the picklist is set to blank.

DefaultItem. The picklist item with Default(True) is selected.

ShowValue. The value entered is displayed if the picklist visualization is such that it can be displayed.


Data Class Alphanumeric PRIM_ALPH

Alphanumeric data class is a string.

Note that by default the Length of this data class is 0 indicating that it does not have a maximum length. If you do specify a maximum length, be careful when assigning the Value of the data class to a field because fields have a maximum length of 255.

Case of the string

Length of the string

Picklist associated with the data class


Case of the string

Case of the string


Length of the string

Length of the string


Picklist associated with the data class

Picklist associated with the data class.

Picklists are used in a property sheet to display a list of values for an entry.

For information of how to use picklists refer to the Developer Guide.


Data Class Boolean PRIM_BOLN

The boolean data class is used with ActiveX components


Data Class Currency PRIM_CRCY

Currency Data Class


Data Class Date PRIM_DATE

Date Data Class


Data Class Date-And-Time PRIM_DAT

Date-And-Time Data Class


Data Class Number PRIM_NMBR

Number Data Class

Number of decimals

DisplayFormat sets the edit code

Length of the number

Picklist associated with the data class


Number of decimals

Number of decimals


DisplayFormat sets the edit code

DisplayFormat sets the edit code.


Length of the number

Length of the number.


Data Class Numeric String PRIM_NSTR

Numeric String Data Class


Data Class Time PRIM_TIME

Time Data Class


Variant Component

Variant Properties

Variant Methods

Variant component can be used to store a variant value.

You can use the Variant component class #PRIM_VAR to create a variant component variable. A variant component variable can contain any type of data (strings, integers, decimals, booleans, components).

A variant component has properties for testing the kind of value contained by the component.

You can retrieve its value in converted forms like numbers, strings or booleans. Variants make it possible for components to give access to values whose type cannot be statically determined. For example, the value of a cell in a grid cannot be statically defined - it depends on the type of the cell's column. By returning a variant, the grid control can provide access to the cell's value without causing compiler errors about the declared type of the value. You then need to write the program in a way that understands what type(s) are in the grid.

Variants are also used in dynamic programming. There are situations (especially with ActiveX) where the type information of a component cannot be determined at compile time. It must be processed at runtime. When using variants, the Visual LANSA compiler does not attempt to resolve the method or property because it has no idea what type of component is stored in the variant. It must wait until runtime to resolve all this information. This behavour enables an ActiveX control to supply a component of unknown type and only when the component is called will the type information be requested.

This statement defines a variant variable called #MYVARIANT:

Define_Com Class(#PRIM_VAR) Name(#MYVARIANT)

You can assign a value to the variant variable either using its Value property (in which case the type of the value is of unspecific type):
Set Com(#myvariant) Value(#XYZ)
Or by explicitly assigning its value type using the String, Integer, Boolean, Decimal or Component properties of the variable:
Set Com(#myvariant) Integer(#XYZ)

Explicitly assigning the type of value is necessary when you use the variable in RDML commands. For example you cannot use CHANGE and IF statements without assigning the variable a type. In RDMLX commands the type can be unspecific.

When you read the value of the variable it is automatically converted to the type of the field that receives the value:

Set Com(#Out_INTEGER) Value(#myvariant)

Or you can also explicitly specify the type of value:

Set Com(#Out_INTEGER) Value(#myvariant.Integer)

To ensure that the value in the variant is one that you can support you use the ValueType property of the variable.

Alternatively, you can create a variable of variant data type:

Define_Com Class(*Variant) Name(#lclVariant)

You use variant functions to work with variant variables.


Variant Properties

Boolean property

Component property

Decimal property

String property

Integer property

ValueType property


Boolean property

Boolean is the value of the variable as boolean

You can use the Boolean property to assign a boolean value to the variable and to retrieve the value of the variable as boolean. The value of Boolean can be True or False.

This code sets the Boolean property of #MYVARIABLE to True if a check box has been selected:

If Cond('#CHECKBOX.ButtonState = Checked')

Set Com(#myvariant) Boolean(True)
Else
Set Com(#myvariant) Boolean(False)
Endif
This code selects a check box if the Boolean property of #MYVARIABLE is True:
If Cond('#myvariant.Boolean = True')
Set Com(#CHECKBOX) Buttonstate(Checked)
Else
Set Com(#CHECKBOX) Buttonstate(Unchecked)
Endif


Component property

Component is the value of the variable as component reference

You can use the Component property to assign a component reference as the value of the variable and to retrieve the value of the variable as a component reference.

When you set reference using a variant variables, methods can be invoked and property SET and GET statements performed without the Visual LANSA compiler doing any checking.

For example a calling a method which does not exist will cause a compile error:

Invoke #Com_Owner.MyMethod

However, if the owner of the component is assigned to a variant variable, no compile error is triggered when a method that does not exist is invoked because the contents of the variable are unknown:

Set #myvariant Component(#Com_Owner)

Invoke #myvariant.Value.MyMethod

At run-time the current value of #myvariant will be examined. If the current value of #myvariant is a component, the ComponentType of that component reference will be accessed for a method called MyMethod. If it exists, the method will be called. If it does not exist, a runtime error is triggered.


Decimal property

Decimal is the value of the variable as decimal

You can use the Decimal property to assign a decimal value to the variable and to retrieve the value of the variable as decimal.

This code assigns a value to the variable as decimal:

Set Com(#myvariant) Decimal(#XYZ)

This code reads the value of the variable as decimal:

Set Com(#XYZ) Value(#myvariant.Decimal)


String property

String is the value of the variable as string

You can use the String property to assign a string value to the variable and to retrieve the value of the variable as string.

This code assigns a value to the variable as a string:

Set Com(#myvariant) String(#XYZ)

This code reads the value of the variable as string:

Set Com(#XYZ) Value(#myvariant.String)


Integer property

Integer is the value of the variable as integer

You can use the Integer property to assign an integer value to the variable and to retrieve the value of the variable as integer.

This code assigns a value to the variable as integer:

Set Com(#myvariant) Integer(#XYZ)

This code retrieves the value of the variable as integer:

Set Com(#XYZ) Value(#myvariant.Integer)


ValueType property

ValueType test the type of value in the variant

Use the ValueType property to test the type of value contained in a variant.

This code tests if the type of value contained in the variable is Integer:

If Cond('#myvariant.ValueType = VarInteger')

Set Com(#Out_INTEGER) Value(#myvariant)
Else
Set Com(#Out_INTEGER) Value(0)
Endif

If this check is not performed and the value cannot be converted at runtime, you will get a runtime error.

The ValueType property is an enumeration whose value can be one of the following symbols:

  • varNull
  • varEmpty
  • varInteger
  • varDouble
  • varString
  • varDecimal
  • varBoolean
  • varComponent


Variant Methods

AssignNull method

AssignEmpty method


AssignNull method

AssignNull assigns a null value to the variable.

Use the AssignNull method to assign a null value to the variable.

Null is a propogating null value, used for SQL's tri-state logic. Null values can be passed from ActiveX components.


AssignEmpty method

AssignEmpty assigns no value to the variable

Use the AssignEmpty method to assign no value to the variable.


Data class component

A data class component maintains and describes a value.

Decimals property

Length property


Decimals property

The Decimals property shows the number of decimals specified for a field in the field definition. A read-only property.


Length property

The Length property shows the length specified for a field in the field definition. A read-only property.


Com Error

Contains the information returned by the last interaction with an ActiveX component.

The success or failure of an interaction with an ActiveX component is indicated by the value of a variable returned by the ActiveX in the form of a HRESULT data type. A HRESULT variable represents a 32-bit integer value that is interpreted in one of three ways:

1. A zero value identifies a successful interaction,

2. A positive nonzero value is returned when an interaction is successful but status information is return, and

3. A negative value is returned when an interaction has failed and error information is returned.

To gain programmatic access to the information returned by an ActiveX, you can use the variable named #COM_ERR_INFO.

The #COM_ERR_INFO component's IsError property indicates whether an interaction has failed and the ErrorCode and ErrorWord properties provide numeric and string representations of the returned HRESULT value.


COM Error Properties

ErrorCode property

ErrorWord property

HelpContext property

HelpFile property

IsError property


ErrorCode property

Returns the current HRESULT as a 32-bit signed integer value.

See the ErrorWord property for some sample values.


ErrorWord property

Returns the current HRESULT value as a hexadecimal string in the form of Xxxxxxxxx where each 'x' is a hexadecimal character consisting of '0' to '9' and 'A' to 'F'.

The following lists some sample HRESULT values with their generally accepted symbol name:

1. E_ACCESSDENIED – A General access denied error.

ErrorWord: X80070005

ErrorCode: -2147024891

2. E_FAIL – An unspecified error has occurred.

ErrorWord: X80040005

ErrorCode: -2147467259

3. E_INVALIDARG – One or more arguments are invalid.

ErrorWord: X80070057

ErrorCode: -2147024809

4. E_UNEXPECTED – A catastrophic failure has occurred.

ErrorWord: X8000FFFF

ErrorCode: -2147418113

5. S_FALSE – The method succeeded and returned the Boolean value FALSE.

ErrorWord: X00000001

ErrorCode: 1

6. S_OK – The method succeeded. If a Boolean return value is expected the return value is TRUE.

ErrorWord: X00000000

ErrorCode: 0


HelpContext property

The HelpContext property returns as a 32-bit integer the context identifier of the help text for a failed HRESULT. This context identifier can be used to lookup the help text in the help file supplied by the HelpFile property.

This property depends on the ActiveX control supplying this information when an error occurs.


HelpFile property

The HelpFile property returns as a string the name of a Window's help file that can be used to display help text for a failed HRESULT.

This property depends on the ActiveX control supplying this information when an error occurs.


IsError property

IsError returns a value indicating whether the current HRESULT is a failure.

IsError will return True if the HRESULT is a negative integer value; otherwise, False.


Com Error Methods

Clear method

ReportError method

ReportErrorAndAbort method

ShowErrorHelp method


Clear method

The Clear method resets the Com Error component state corresponding to a HRESULT of zero.


ReportError method

This method reports the current Com Error state in a message box.


ReportErrorAndAbort method

This method reports the current Com Error state in a message box before aborting the application.


ShowErrorHelp method

If the ActiveX has supplied the necessary information to show help for the current error, a help window will be opened.


Application component

Application component


Mouse component

The mouse component indicates the position of the mouse

The mouse component indicates the position of the mouse cursor.

The predefined variable SYS_MOUSE is based on the mouse component. The easiest way to find out the position of the mouse is to use the properties of this variable:

HorPosition Horizontal position is the number of pixels from the left

VerPosition Vertical position is the number of pixels from the top

For example you could assign the horizontal poisition value to a field:

change #Std_Num #SYS_MOUSE.HorPosition


Mouse Event Parameters

PosX Parameter

PosY Parameter

IsAltDown Parameter

IsControlDown Parameter

IsShiftDown Parameter

IsLeftButtonDown Parameter

IsMiddleButtonDown Parameter

IsRightButtonDown Parameter


PosX Parameter

PosX shows the position of the mouse in relation to the X co-ordinate.


PosY Parameter

PosY shows the position of the mouse in relation to the Y co-ordinate.


IsAltDown Parameter

IsAltDown indicates whether the Alt key is pressed down.


IsControlDown Parameter

IsControlDown indicates whether the Control key is pressed down.


IsShiftDown Parameter

IsShiftDown indicates whether the Shift key is pressed down.


IsLeftButtonDown Parameter

IsLeftButtonDown indicates whether the left mouse button is pressed down.


IsMiddleButtonDown Parameter

IsMiddleButtonDown indicates whether the middle mouse button is pressed down.


IsRightButtonDown Parameter

IsRightButtonDown indicates whether the right mouse button is pressed down.


Keyboard component

The keyboard component indicates if Shift, Alt or Ctrl is pressed down

The keyboard component indicates whether the Shift, Alt or Ctrl key is pressed down.

The predefined variable SYS_KEYBD is based on the keyboard component. The easiest way to find out whether the Alt, Ctrl or Shift key has been pressed is to use the properties of this variable:

AltKeyDown True or False. Indicates whether the Alt key is pressed down.

ShiftKeyDown True or False. Indicates whether the Shift key is pressed down.

ControlKeyDown True or False. Indicates whether the Control key is pressed down

You could use the variable for example like this:

if cond'(#sys_keybd.AltKeyDown *eq True)'...


Property Sheet

Displays properties of an object

Use a property sheet to display properties of an object. The Details tab in the editor is an example of a property sheet.

Typically a property sheet has two columns, one for the description of the property, the other one for the value of the property. The value can be either a simple value or a list of values (picklist).

As with any list-type component, start creating your property sheet by dragging the property sheet component to your form or reusable part. Next add columns to the property sheet by dragging fields from the repository.

Typically you define two columns in the property sheet, one for the descriptions of the properties and the other one for the values of the properties. Note that in a property sheet you do not want the columns to be based on fields with data (as you usually do with lists). This is because every entry of the property sheet will display a different attribute based on a different field.

To add an entry in a property sheet:

1. In the Initialize event of your property sheet specify a description and a value for the entry (in this example the first column is based on the field #PROPERTY and the second column on the field #VALUE):

CHANGE field(#PROPERTY) to('''First Name''')

CHANGE field(#VALUE) to(#GIVENAME)

2. Add the entry to the property sheet:

ADD_ENTRY to_list(#PROP_1)

3. Define a Data Class for the entry (in the beginning of your component):

DEFINE_COM class(#GIVENAME) name(#GIVENAME)

And in the Initiallize event routine assign the data class to the entry. The data class will handle the way the value is displayed and entered:

SET com(#prop_1.CurrentItem) DATACLASS(#givename)

This statement tells the property sheet that the value for this entry in the second column in the property sheet should be shown (and edited) according to the class #GiveName. For example, it cannot be more than 20 characters long and it can contain upper or lowercase characters.

These are the basic steps you repeat with every property sheet entry you add.

Refer to the Developer Guide for examples of how to use the property sheet.


Property sheet column

Ý Property Sheet


Property sheet item

Property sheet item Ancestor property

Ý Property Sheet


Property sheet item Ancestor property

Ancestor property shows the component from which this component inherits.

Use the Ancestor property to select the component from which this component inherits from.

By default all forms inherit from #PRIM_FORM which is the elementary Visual LANSA form. #PRIM_FORM cannot be modified. You can specify any other form as the ancestor of a form. The inheriting form inherits all the components of its ancestor. If you make changes to the ancestor form, these changes are reflected in the inheriting form.

You can change the properties of the inherited form and its components. When you change the property of an inherited component, it permanently overrides the original value. So for example if the form has an ancestor form which contains a push-button with the caption 'Save' and you change this to 'Save Changes' on the inheriting form, this caption will not change when you change the caption of the button on the ancestor form.

By default reusable parts inherit from #PRIM_PANL, a panel on which you can put other components. You can make any Visual LANSA control, such as a button, tab folder, tree view etc. the ancestor of a reusable part. You can also use one reusable part as the ancestor of another reusable part.

DefaultProperty property

Public property

Private property

Protect property

Framework property

Group property

Description property


DefaultProperty property

DefaultProperty property defines the default property of a component

Use the DefaultProperty property to set the default property for a component. You can then access the default property simply by using the name of the component.

For example if the default property of the component #VL_DEM57 is the Caption property, you can access the component's caption simply by referring to its name:

Change Field(#STD_TEXTS) To(#VL_DEM57)

This is the same as explicitly referring to its Caption property:

Change Field(#STD_TEXTS) To('#VL_DEM57.caption')


Public property

Public property makes visible hidden custom-defined events, methods or properties

Use the Public property of a form or a reusable part to make public a custom-defined event, method, or property of its ancestor which has been defined as protected in the ancestor.

A form or a reusable part can define that custom-defined events, methods and properties are not accessible from outside using the Protect property of the form or reusable part. Events, methods and properties defined as protected are visible to forms and reusable parts which inherit from it, but they are not visible to owner forms or reusable parts. An inheriting form or a reusable part can make an inherited protected event, method or property visible to all other components by defining them as Public.

The list of values for Public shows two internal system values CreateInstance and DestroyInstance. They should not be used.


Private property

Private property hides custom-defined events, methods and properties

Use the Private property of a form or a reusable part to hide a custom-defined event, method or property from other forms or reusable parts. An event, method or property defined as Private is not visible to inheriting or owning reusable parts or forms.


Protect property

Protect property partially hides custom-defined events, methods and properties

Use the Protect property to hide custom-defined events, properties or methods from owner reusable parts or forms. An event, method or property defined as protected is visible to inheriting reusable parts and forms. These can make the protected event, property or method visible to owners by defining it as Public.


Framework property

Framework is a business

Frameworks are a business-oriented grouping of items. For example all the components used to create the LANSA Personnel Demo application are in the Human Resources framework.

There are also some more generic frameworks such as Manufacturing and Executive Information which are used to store components typically needed in these kinds of applications.

To create your framework use the Create or change partition option on the Housekeeping menu in LANSA/AD. After creating a new framework you should refresh the partition details in LANSA for Windows.

You can specify the framework in which you want to store a component when you create it. You can also change the framework in the Component Editor.


Group property

Group is a user-defined group in which components are stored.

Groups are a development-oriented means of grouping similar items together. For example there are default groups for standard buttons, menus, and fields.

Groups are user-definable, but LANSA is shipped with a standard set of groups. A component can belong to more than one group.

To create your groups use the Create or change partition option on the Housekeeping menu in LANSA/AD. After creating a new group you should refresh the partition details in LANSA for Windows. You can specify the groups in which you want to store a component when you create it. You can also change the group in the Component Editor.


Description property

Description of the component

The Description property is used to specify a description to be associated with the component. This description is an identification aid to any user of the component.


Basic Layout

Not to be displayed.

Manage property

Parent property

MarginTop property

MarginLeft property

MarginRight property

MarginBottom property


Manage property

Defines the visual component to be managed.


Parent property

Defines the item's layout manager component.


MarginTop property

Defines a top margin.


MarginLeft property

Defines a left margin.


MarginRight property

Defines a right margin.


MarginBottom property

Defines a bottom margin.


Base layout manager

Base layout manager.

For LANSA Product Centre's internal use only.

MaxHeight property

MinHeight property

MaxWidth property

MinWidth property


MaxHeight property

The MaxHeight property sets the maximum height of the layout manager.


MinHeight property

The MinHeight property sets the minimum height of the layout manager.


MaxWidth property

The MaxWidth property sets the maximum width of the layout manager.


MinWidth property

The MinWidth property sets the minimum width of the layout manager.


Base layout item

For LANSA Product Centre's internal use only.


Attachment Layout Manager

An attachment layout divides the container into five cells. The center cell expands to fill any available space.

ProcessingOrder property

Attachment Layout Item


ProcessingOrder property

Defines the scheme used to order the processing of Attach Layout Items.

Vertical: Items are attached to the top first, followed by items attached to the bottom, then comes items attached to the left, followed by items attached to the right. Items attached to the center are processed last.

Horizontal: Items are attached to the left first, followed by items attached to the right, then comes items attached to the top, followed by items attached to the bottom. Items attached to the center are processed last.

DisplayPosition: Items that are attached to the top, bottom, left and right are processed in their DisplayPosition order. Items attached to the center are processed last.

Vertical is the default.


Attachment Layout Item

Attachment property

Percentage property


Attachment property

Defines where a component is to be attached.

None: No attachment. The layout manager does not manage the component.

Top: Attach the component to the top of its parent's display area.

Bottom: Attach the component to the bottom of its parent's display area.

Left: Attach the component to the left side of its parent's display area.

Right: Attach the component to the right side of its parent's display area.

Center: Attach the component to the center of its parent's display area.

When processing the attachment property, items are attached based on the setting of the ProcessingOrder property of the item's parent attach layout component.


Percentage property

Defines percentage used to size component.


Split Layout Manager

The Split Layout Manager is used to manage a component's display area such that the components children are split either across or down the display area. The orientation property defines the direction of the divisions. Optionally, the items managed by this layout manager can be automatically sized as the component changes size and resizing dividers can be displayed so that application users are able to adjust the splits to their own liking.

Orientation property

Split Layout Manager


Orientation property

Defines the orientation of the divider.

Vertical: Splits the items into divisions across the display area of a component.

Horizontal: Splits the items into divisions down the display area of a component.


Split Layout Manager

Use the DividerStyle property to set the layout divider style. The style can be either a bar, a raised bar, a line or a gap which is not visible (but the cursor will change when moved over the gap).


Split Layout Item


Sizable property

The Sizable property controls the availability of a divider between this item and the item that follows it in the display area. If the sizable property is false, the application user will not be able to adjust the way the display area is divided.

Sizable property

Weight property


Weight property

The Weight property controls the allocation of space when the display area being managed changes size. When the weight property is zero, the component being managed by this item is not resized. If all items have the same value, they will share the space equally.


Flow Layout Manager

The Flow Layout Manager is used to position components in a display area by dividing the items into rows or columns and then flowing the items one after the other in the appropriate row/column.

The division into rows or columns is controlled by the Direction property and the number of rows/columns is controlled by the ItemsPerDivision property.

Direction property

ItemsPerDivision property

FlowOperation property

FlowOperationHorizontal property

FlowOperationVertical property

MaxColumns property

MaxRows property

MinColumns property

MinRows property

SizingRuleHorizontal property

SizingRuleVertical property

Spacing property

SpacingItems property


Direction property

Defines the direction of flow management

Defines how the items are divided in the display area and the direction that the items are flowed in the resulting rows and columns.

LeftToRight: Divides the items into rows; flows the rows from top to bottom and flows the items from left to right in each row.

RightToLeft: Divides the items into rows; flows the rows from top to bottom and flows the items from right to left in each row.

TopToBottom: Divides the items into columns; flows the columns from left to right and flows the items from top to bottom in each column.

BottomToTop: Divides the items into columns; flows the columns from left to right and flows the items from bottom to top in each column.


ItemsPerDivision property

Defines the number of items to position in each row/column.

When the Direction property is LeftToRight or RightToLeft, the ItemsPerDivision property controls how the display area is divided into rows. When the ItemsPerDivision property is zero, the display area will contain enough rows to contain all the items, otherwise the ItemsPerDivision property defines the number of items per row and the display area will contain enough rows to contain all the items.

When the Direction property is TopToBottom or BottomToTop, the ItemsPerDivision property controls how the display area is divided into columns. When the ItemsPerDivision property is zero, the display area will contain enough columns to contain all the items, otherwise the ItemsPerDivision property defines the number of items per column and the display area will contain enough columns to contain all the items.

This property overrides the values of the MaxColumns, MinColumns, MaxRows and MinRows properties.


FlowOperation property

Defines the flow operation used to flow the rows/columns.

When the Direction property is LeftToRight:

Center: Rows are separated by the value of the Spacing property and they are all vertically centered in the display area.

Increase: Rows are positioned from top to bottom down the display area, separated by the value of the Spacing property.

Decrease: Rows are positioned from bottom to top up the display area, separated by the value of the Spacing property.

Spread: Rows are separated by the value of the Spacing property and any remaining vertical space is spread between the rows.

When the Direction property is RightToLeft:

Center: Rows are separated by the value of the Spacing property and they are all vertically centered in the display area.

Increase: Rows are positioned from bottom to top up the display area, separated by the value of the Spacing property.

Decrease: Rows are positioned from top to bottom down the display area, separated by the value of the Spacing property.

Spread: Rows are separated by the value of the Spacing property and any remaining vertical space is spread between the rows.

When the Direction property is TopToBottom:

Center: Columns are separated by the value of the Spacing property and they are all horizontally centered in the display area.

Increase: Columns are positioned from left to right across the display area, separated by the value of the Spacing property.

Decrease: Columns are positioned from right to left across the display area, separated by the value of the Spacing property.

Spread: Columns are separated by the value of the Spacing property and any remaining horizontal space is spread between the columns.

When the Direction property is BottomToTop:

Center: Columns are separated by the value of the Spacing property and they are all horizontally centered in the display area.

Increase: Columns are positioned from right to left across the display area, separated by the value of the Spacing property.

Decrease: Columns are positioned from left to right across the display area, separated by the value of the Spacing property.

Spread: Columns are separated by the value of the Spacing property and any remaining horizontal space is spread between the columns.


FlowOperationHorizontal property

Defines the horizontal flow operation for components in a row or column

Defines the horizontal flow operation for components in a row or column.

When the display area is divided into rows:

Center: Items are separated by the value of the SpacingItems property and they are all horizontally centered in the row.

Increase: Items are positioned from the left or right increasing across the row, separated by the value of the SpacingItems property.

Decrease: Items are positioned from the left or right decreasing across the display area, separated by the value of the SpacingItems property.

Spread: Items are separated by the value of the SpacingItems property and any remaining horizontal space is spread between the items.

When the display area is divided into columns:

Center: Items are horizontally centered in a column.

Increase: Items are positioned at the left or right side of a column.

Decrease: Items are positioned at the right or left side of a column.

Spread: Same as Center.


FlowOperationVertical property

Defines the vertical flow operation for components in a row or column.

When the display area is divided into rows:

Center: Items are horizontally centered in a row.

Increase: Items are positioned at the top or bottom of a row.

Decrease: Items are positioned at the top or bottom of a row.

Spread: Same as Center.

When the display area is divided into columns:

Center: Items are separated by the value of the SpacingItems property and they are all vertically centered in the column.

Increase: Items are positioned from the top or bottom, increasing down the the display area, separated by the value of the SpacingItems property.

Decrease: Items are positioned from the top or bottom, decreasing up the display area, separated by the value of the SpacingItems property.

Spread: Items are separated by the value of the SpacingItems property and any remaining vertical space is spread between the items.


MaxColumns property

Use the MaxColumns property to set the maximum number of columns in the layout.

Note that MaxColumns overrides the MinColumns, i.e. if the minimum is greater than the maximum, it is set to the value of MaxColumns.

The ItemsPerDivision property overrides this property.


MaxRows property

Use the MaxRows property to set the maximum number of rows in the layout.

Note that MaxRows overrides the MinRows, i.e. if the minimum is greater than the maximum, it is set to the value of MaxRows.

The ItemsPerDivision property overrides this property.


MinColumns property

Use the MinColumns property to set the minimum number of columns in the layout.

Note that MaxColumns overrides the MinColumns, i.e. if the minimum is greater than the maximum, it is set to the value of MaxColumns.

The ItemsPerDivision property overrides this property.


MinRows property

Use the MinRows property to set the minimum number of rows in the layout.

Note that MaxRows overrides the MinRows, i.e. if the minimum is greater than the maximum, it is set to the value of MaxRows.

The ItemsPerDivision property overrides this property.


SizingRuleHorizontal property

Defines horizontal sizing rule.

None: The components width is not adjusted.

Maximum: The components width is changed to fit inside the column it's item has been assigned.


SizingRuleVertical property

Defines vertical sizing rule.

None: The components height is not adjusted.

Maximum: The components height is changed to fit inside the row it's item has been assigned.


Spacing property

Defines spacing between rows or columns.


SpacingItems property

Defines spacing between items in a row or column.


Flow Layout Item


Grid Layout Item

Grid Layout Manager

RuleAlignment property

Top property

Left property

Width property

Height property

RuleAlignment property

RuleSizing property

WeightHorizontal property

WeightVertical property


Grid Layout Manager

Grid Layout Manager


RuleAlignment property

Defines the rule for aligning the grid itself in the component.


Top property

Defines the row from top where the layout cell is located

Use the Top property to specify the row from top where the layout cell is located.


Left property

Defines the column from left where the layout cell is located

Use the Left property to specify the column from left where the layout cell is located.


Width property

Defines how many columns the layout contains

Use the Width property to specify how many columns the layout contains.


Height property

Defines how many rows the layout contains.

Use the Height property to specify how many rows the layout contains.


RuleAlignment property

Defines the rule for aligning a component in its cell

Use the RuleAlignment property to define how the component is aligned inside its cell.


RuleSizing property

Defines the rule for sizing a component in its cell

Use the RuleSizing property to define how the component is sized inside its cell.


WeightHorizontal property

Defines the weight used to horizontally resize a component

Use the WeightHorizontal property to set the weight used when the component is resized horizontally.

Weight controls the allocation of space when the display area being managed changes size. When the weight property is zero, the component being managed by this item is not resized. If all items have the same value, they will share the space equally.


WeightVertical property

Defines the weight used to vertically resize a component

Use the WeightVertical property to set the weight used when the component is resized vertically.

Weight controls the allocation of space when the display area being managed changes size. When the weight property is zero, the component being managed by this item is not resized. If all items have the same value, they will share the space equally.


ProgID property

Use the ProgID property of an ActiveX component to specify the ProgID of the ActiveX control or the ActiveX-enabled application you want to enrol in the LANSA repository. Display a list of ActiveX controls and applications that have been installed on your PC by clicking on the button with ellipses (three dots) and select the ProgID for the control or application from the list.

The ProgID (programmatic ID) parameter is the human readable name of an ActiveX component, for example SSCalendar.SSDateComboCtrl.1. The ProgID is an alias of the class ID of an ActiveX component. The class ID is a globally unique identifier (GUI), a 128 bit value guaranteed to be unique, represented as a 16-digit hex number.


TypeLibId property

The TypeLibId property specifies the type library for the ActiveX component being enrolled.

The purpose of the type library is to provide an interface which lets applications interface with the ActiveX component. The library describes in detail the classes in the component and their methods, properties, events, constants etc.


Shortcut key

Use the Shortcut key component to associate a shortcut key with a component or a set of components at run time. The Shortcut component has a Pressed event which is triggered when the shortcut key is used.

If you assign a shortcut key to a container component (such as for example a form, a panel or a reusable part), the shortcut key will be enabled for all components contained in it. In other words, the shortcut key will trigger the Pressed event regardless of which component on the container has the focus.

You can choose a shotcut key from the list of values provided for the Shortcut parameter. These values include function keys (Fn) and combinations of Ctrl, Alt and Shift keys and letters.

In the following form the shortcut key component (with the shortcut F4) is assigned to the form. The form contains two fields. At run-time pressing F4 will trigger the Pressed event for the shortcut key regardless of where the focus is on the form:

FUNCTION OPTIONS(*DIRECT)

BEGIN_COM HEIGHT(188) LEFT(416) TOP(153) WIDTH(425)
DEFINE_COM CLASS(#PRIM_STPG) NAME(#FORM_SHORTCUTKEY) HOTKEY(F4) PARENT(#COM_OWNER)
DEFINE_COM CLASS(#ADDRESS1.Visual) NAME(#ADDRESS1) DISPLAYPOSITION(1) HEIGHT(19) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(1) TOP(24) WIDTH(363)
DEFINE_COM CLASS(#ADDRESS2.Visual) NAME(#ADDRESS2) DISPLAYPOSITION(2) HEIGHT(19) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(2) TOP(56) WIDTH(363)
EVTROUTINE HANDLING(#FORM_SHORTCUTKEY.Pressed)
use builtin(MESSAGE_BOX_SHOW) with_args(OK OK 'Shortcut' '' 'Shortcut key for form pressed. ')
ENDROUTINE
END_COM

You could assign separate shortcut key components (with the same or different shortcut) to the fields on the form to trigger a different action when the focus is in a field.

Further, when showing a form with a FormStyle of NormalChild, OwnedChild or StayOnTopChild, any Shortcut key components assigned to the form's FormOwner will be enabled. Using the forms SC_MAIN and SC_CHILD, when Shift+F1 is pressed while focus is in one of SC_CHILD_1's edit boxes, the key press will act the same as pressing Shift+F1 in SC_MAIN. In contrast, pressing Shift+F1 in one of SC_CHILD_2's edit boxes will trigger some Visual LANSA help.


HotKeyPressed Event

The Pressed event is triggered when the user presses a shortcut key. Use this event to specify the action to be triggered by the shortcut key.

The following Pressed event displays a message box when the shortcut key is pressed:

EVTROUTINE HANDLING(#FORM_SHORTCUTKEY.Pressed)

use builtin(MESSAGE_BOX_SHOW) with_args(OK OK 'Shortcut' '' 'Shortcut key for form pressed. ')

ENDROUTINE

Form SC_MAIN:

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(79) Clientwidth(492) Height(106) Left(244) Top(124)
Define_Com Class(#SC_CHILD) Name(#SC_CHILD_1) Componentversion(1) Formstyle(NormalChild) Left(400)
Define_Com Class(#SC_CHILD) Name(#SC_CHILD_2) Componentversion(1)
Define_Com Class(#PRIM_STPG) Name(#STPG_1) Parent(#COM_OWNER) Shortcut(Shift+F1)

Evtroutine Handling(#com_owner.Initialize)
Set Com(#com_owner) Caption(*component_desc)

#SC_CHILD_1.FormOwner <= #Com_Owner
#SC_CHILD_1.ShowForm

#SC_CHILD_2.ShowForm
Endroutine
Evtroutine Handling(#STPG_1.Pressed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Use Builtin(OV_Message_Box) With_Args("Short cut has been pressed")
Endroutine
End_Com

Form SC_CHILD:

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(100) Clientwidth(333) Height(127) Left(46) Top(412) Width(341)
Define_Com Class(#PRIM_EDIT) Name(#EDIT_1) Displayposition(1) Left(8) Parent(#COM_OWNER) Showselection(False) Showselectionhilight(False) Tabposition(1) Top(8) Width(313)
Define_Com Class(#PRIM_EDIT) Name(#EDIT_2) Displayposition(2) Left(8) Parent(#COM_OWNER) Showselection(False) Showselectionhilight(False) Tabposition(2) Top(48) Width(313)

Evtroutine Handling(#com_owner.Initialize)
Set Com(#com_owner) Caption(*component_desc)
Endroutine

End_Com


Safe Array

A safe array is an array that contains information about the number of its dimensions and its bounds. A safe array can contain up to three dimensions.

These arrays are called safe arrays because they contain information about their bounds so you can check the index against the bounds before you access data in the array.

Safe Array Properties

Safe Array Methods


Safe Array Properties

Collects Property

Dimension1Size property

Dimension2Size property

Dimension3Size property

Safe Array Item Property

MaxDimensions Property


Collects Property

Use the Collects property to specify the type of component contained in the array.


Dimension1Size property

The Dimension1Size property specifies the number of elements in the first dimension of the array.


Dimension2Size property

The Dimension2Size property specifies the number of elements in the second dimension of the array.


Dimension3Size property

The Dimension3Size property specifies the number of elements in the third dimension of the array.


Safe Array Item Property

The Item property identifies the array element. This property accepts three parameters, the first one is mandatory and the next two are optional.


MaxDimensions Property

The MaxDimensions property sets the maximum number of dimensions in the array. This value cannot be greater than three.


Safe Array Methods

Add method


Add method

Use the Add method to add items to the end of an array sequentially.


Entry Field

Entry field component


Collection

Collection


Array collection

Array collections are a dynamically sized, ordered collection of components that can be located by indexing. Indexing is always relative to 1.


Array collection accessor

An accessor is a component that provides read-only access to the collection.


Collection accessor

An accessor is a component that provides read-only access to the collection.


Keyed collection accessor

An accessor is a component that provides read-only access to the collection.


Array collection iterator

An iterator component enables iteration over the content of the collection.


Collection iterator

An iterator component enables iteration over the content of the collection.


Keyed collection iterator

An iterator component enables iteration over the content of the collection.


Dictionary collection

Dictionary collections are an unordered sequence of key-value component pairs with no duplicates of the key.


Dictionary collection accessor

An accessor is a component that provides read-only access to the collection.


Dictionary collection iterator

An iterator component enables iteration over the content of the collection.


List collection

List collections provide an ordered collection of components. The features of the list component are positional in nature, in reference to a given index or to the beginning or end of the list. Indexing is always relative to 1.

ListCollectionMethods


List Collection Methods

Append method

Concatenate method

OtherList to append parameter

OtherList to concatenate parameter

Result parameter


Append method

The Append method inserts the components in the supplied collection to the end of its collections.

The syntax is:

Append(#CollectionVariable)

This statement appends the collection #List to #Collection:

Invoke Method(#Collection.Append) Otherlist(#List)


Concatenate method

The Concatenate method creates a new collection by combining the items in two collections: the collection against which you are executing the method and the collection that was supplied in the OtherList parameter.

Each collection must be the same type to perform the operation.

This statement combines #Collection and #List and returns the new collection in Result:

Define_Com Class(#PRIM_LCOL<#PRIM_PHBN>) Name(#COLLECTION)

Define_Com Class(#PRIM_LCOL<#PRIM_PHBN>) Name(#List)

Define_Com Class(#PRIM_LCOL<#PRIM_PHBN>) Name(#Result) Reference(*DYNAMIC)

Invoke Method(#Collection.Concatenate) Otherlist(#List) Result(#Result)


OtherList to append parameter

Use the OtherList parameter to specify the other collection to be added to the end of this collection.


OtherList to concatenate parameter

Use the OtherList parameter to specify the other collection to be concatenated.


Result parameter

The Result parameter returns the new collection created.


List collection accessor

An accessor is a component that provides read-only access to the collection.


List collection iterator

An iterator component enables iteration over the content of the collection.

IsEqual event


Basic Collection

Basic Collection Item

Basic Collection Events

Basic Collection Methods

Basic Collection Property


Basic Collection Item


Item parameter

Use the Item parameter to specify the item to be searched for.


Object parameter

Use the Object parameter to specify the component to which the component specified in the Subject parameter is compared to.


Subject parameter

Use the Subject parameter to specify the component to be compared


Result parameter

The Result parameter is the result of the comparison.


KeyOf property

Use the KeyOf property to return the value of the key of an item in a collection.

This statement loops through a collection and assigns the value of the key of every item to field #STD_COUNT and the caption of the items to field #STD_DESCS and then adds them to a grid:

For Each(#Current) In(#Collection)

Change Field(#STD_COUNT) To('#Collection.KeyOf<#Current>')
Change Field(#STD_DESCS) To('#Current.Caption')
Add_Entry To_List(#GRID_1)
Endfor


Item parameter

Use the Item parameter to specify the Item the key of which is to be retrieved.


Value parameter

The value to be hashed.

The Value parameter is a Variant so it can take any type of value and hash it appropriately.


Result parameter

The Result parameter is the result of the hash value calculation.


Basic Collection Events

IsEqual event

Compare event

Hash event


Hash event

Hash is triggered when an integer value needs to be determined to organize the collection

The Hash event is triggered when the collection needs to determine if two components in the collection are equal.

If this event is not handled, the collection will compare for equality of component references.

There are situations where you want to be able to look up a dictionary based on a value like a name or identifier. To obtain a hash for these kinds of values invoke the CalculateHash method during the Hash event supplying the value(s) that you want hashed:

Evtroutine Handling(#COLLECTION.Hash) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Subject(#Subject) Hash(#Hash)

Invoke Method(#Collection.CalculateHash) Value(#Subject) Result(#Hash)
Endroutine


Result parameter

The Result parameter indicates if there is a next component.

If the next component exists, the value of Result is True.

Subject parameter

Hash parameter


Subject parameter

The Subject parameter is the value to be hashed.


Hash parameter

The Hash parameter is the result of the hash operation.

Result parameter


Result parameter

The Result parameter returns a reference to the item that was replaced by the inserted item.


IsEqual event

This event is fired when the collection are equal.

The IsEqual event is fired when the collection needs to determine if two components in the collection are equal. If this event is not handled, the collection will compare for equality of component references.

The following example compares two components in a collection:

Evtroutine Handling(#COLLECTION.IsEqual) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Subject(#Subject) Object(#Object) Equal(#Equal)

If Cond('#Subject.Value = #Object.Value')
Set Com(#Equal) Value(True)
Else
Set Com(#Equal) Value(False)
Endif
Endroutine

When the collection signals the IsEqual event depends on the type of collection:

1. Most collections will signal the event when features that involve finding and searching are invoked. The IsEqual method is used to find the item that you are after. Methods like Remove and keyed properties like KeyOf will cause the event to be fired many times as the object of the action is being found.

2. Some collections that do not allow duplicates (like Dictionary and Set) will use the Hash event to detect hashing siblings and then they will use the IsEqual event to distinguish the siblings. So these collections fire it on the Insert(s) as well.

IsEqual is useful when you want to add components into a collection and find these components based on some value or value(s) inside each component. For example you may want to collect a set of Employee objects in a list for transfer and you want to ensure that no Employee object is added to the list more than once. In this case you could use the EMPNO value of the employee as the IsEqual distinguisher.

IsEqual Parameters

Object parameter

Subject parameter

Equal parameter


Object parameter

Object is the component being compared to

The Object parameter is the component to which the component specified in the Subject parameter is compared to.


Subject parameter

The Subject parameter is the component to be compared.


Equal parameter

Equal is the result of the comparison

The Equal parameter is the result of the comparison. It can be either True or False.


Compare event

Compare is triggered when two key components need to be compared

The Compare event is triggered when the collection needs to compare two key components in the collection. If this event is not triggered, the collection will compare the component references.

The Compare event needs to return the result as Greater, Less or Equal.

This Compare event routine compares Subject and Object values to see if they are equal:

Evtroutine Handling(#COLLECTION.Compare) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Subject(#Subject) Object(#Object) Result(#Result)

If Cond('#Subject.Value > #Object.Value')
Set Com(#Result) Value(Greater)
Else
If Cond('#Subject.Value < #Object.Value')
Set Com(#Result) Value(Less)
Else
Set Com(#Result) Value(Equal)
Endif
Endif
Endroutine

Object parameter

Subject parameter

Result parameter


Basic Collection Methods

CreateAccessor method

CreateIterator method

MoveNext method

Reset method

CalculateHash method

Remove method

RemoveAll method

RemoveAt method

RemoveFirst method

RemoveLast method

ReplaceAt method

ContainsItem method

OccurrencesOf method

Find method

Contains method

Insert method

InsertAfter method

InsertBefore method

InsertFirst method

InsertLast method


CreateAccessor method

The CreateAccessor method creates an accessor component that provides read-only access to the collection.

The recommended method of establishing read-only access to a collection is to use Define_Pty with Get(*Collection). For an example see the Visual LANSA Components A Developer's view.

Result parameter


Result parameter

The Result parameter receives the reference to the created accessor.


CreateIterator method

CreateIterator method creates an iterator component that enables iteration through the collection

The CreateIterator method creates an iterator component that enables iteration over the content of the collection.

The recommended method of iterating through a collection is using a FOR/ENDFOR loop.

Result parameter


Result parameter

Returns a component reference to a component created by the CreateIterator method.


MoveNext method

The MoveNext method moves the iterator to the next component and returns a result indicating if there is a next component.

Result parameter


Reset method

Reset starts the iterator

Use the reset method to start the iterator so that you can iterate over the full collection.


CalculateHash method

Use the CalculateHash method to calculate a hash value.

Hash values are used by the collection in order to obtain a hash that will always identify a component. Using the hash, only those components in the collection with the same hash are checked for equality. The default hash is the pointer to the component.

There are situations where you want to be able to look up a dictionary based on a value like a name or identifier. To obtain a hash for these kinds of values invoke the CalculateHash method during the Hash event supplying the value(s) that you want hashed:

Evtroutine Handling(#COLLECTION.Hash) Options(*NOCLEARMESSAGES *NOCLEARERRORS) Subject(#Subject) Hash(#Hash)

Invoke Method(#Collection.CalculateHash) Value(#Subject) Result(#Hash)

Endroutine

Note that a hash event is only used by unordered collections (Set and Dictionary) that need to be able to do lookups quickly when there could be a large number of items in the collection.

Other collections do lookups using the Compare event as a means to sort the items.

Ordered collections do lookups by searching through the collection looking for a match. These collections use the IsEqual event and include the List and Array collection classes.

Result parameter

Value parameter


Remove method

The Remove method removes an item from a collection:

This statement removes button #PHBN from the collection:

Invoke Method(#Collection.Remove) Object (#Phbn_1) Result(#Item)

This method removes an item identified by its key:

Invoke Method(#Collection.Remove) Key(#Key) Result(#Item)

The parameters of the Remove method are different for different collection types:

  • For keyed collections the item to be removed is identified by its key.
  • For other collections the item to be removed is identified by the Object parameter.
  • Result parameter
  • Object parameter

    • Key parameter for deletion


Result parameter

The Result parameter returns a reference to the removed item.


Object parameter

Use the Object parameter to specify the object to be removed from the collection.


Key parameter for deletion

Use the Key parameter to specify the key of the item to be removed from the collection.


RemoveAll method

Use the RemoveAll method to remove all items in a collection.

This statement removes all items in a collection:

Invoke Method(#Collection.RemoveAll)


RemoveAt method

Use the RemoveAt method to remove an item with a specified index number.

This statement removes from the collection an item with an index value specified in the field #STD_NUM:

Invoke Method(#Collection.RemoveAt) Index(#STD_NUM)

Result parameter

Index parameter


Index parameter

Use the Index parameter to specify the index number of the item to be removed.


RemoveFirst method

Use the RemoveFirst method to remove the first item in a collection.

This statement removes the first item in a collection:

Invoke Method(#Collection.RemoveFirst)

Result parameter


RemoveLast method

Use the RemoveLast method to remove the last item in a collection.

This statement removes the last item in a collection:

Invoke Method(#Collection.RemoveLast)

Result parameter


ReplaceAt method

ReplaceAt replaces an item with a specified index number

Use the ReplaceAt method to replace an item with a specified index number with another item.

This statement replaces an item with index number specified in field #STD_NUM with button #PHBN_1:

Invoke Method(#Collection.ReplaceAt) Item(#Phbn_1) Index(#STD_NUM)

Result parameter

Item parameter

Index parameter


Result parameter

The Result returns a reference to the item that was replaced at the specified location.

It is *NULL when inserting after the last item in the collection.


Item parameter

Use the Item parameter to specify the item to be added to the collection.


Index parameter

Use the Index parameter to specify the index number of the item to be replaced.


ContainsItem method

Use the ContainsItem method to see if an item exists in a collection.

This statement checks if component #PHBN_1 exists in the collection:

Invoke Method(#Collection.ContainsItem) Item(#Phbn_1) Result(#STD_BOOL)

Result of ContainsItem


Result of ContainsItem

The Result of the ContainsItem method is either True or False.


OccurrencesOf method

The OccurrencesOf method returns the number of occurrences of an object.

Use the OccurrencesOf method to return the number of occurrences of an object.

This method returns the number of occurrences of button #PHBN_1:

Invoke Method(#Collection.OccurrencesOf) Object(#Phbn_1) Result(#STD_COUNT)

Result parameter

Object parameter


Result parameter

The Result parameter returns the number of occurrences of the specified object.


Object parameter

Use the Object parameter to specify the object the occurrences of which are counted.


Find method

Find method returns a reference to a item in a collection

Use the Find method to locate an item in a collection and to set a reference to it.

This statement locates the item based on its key and sets a reference to it in the Result parameter:

Invoke Method(#Collection.Find) Key(#Key) Result(#Item)

The Find method has two different forms:

  • The Find method of collections which are keyed use the Key parameter to check a matching key component exists in the collection.
  • The Find method of other collections use the Object parameter.
  • Key parameter
  • Object parameter
  • Result parameter


Key parameter

Use the Key parameter to identify the item to be searched.


Object parameter

Use the Object parameter to identify the item to be searched.


Result parameter

The Result parameter returns a reference to the item found.


Contains method

Contains looks for an item based on its key.

Use the Contains method to check if an object exists in a collection. If it exists, the Result of the Contains method is set to True.

The Contains method has two different forms:

The Contains method of both dictionary and sorted dictionary collections use the Key parameter to check if a matching key component exists in the collection:

Invoke Method(#Collection.Contains) key(#index) Result(#STD_bool)

The Contains method of other collections use the Object parameter because the supplied reference is used as an object of the search, the matching conditions depending on the logic used in the IsEqual and Compare events:

Invoke Method(#Collection.Contains) Object(#Phbn_1) Result(#STD_BOOL)

Result parameter


Result parameter

The Result of the contains method is either True or False.


Object parameter

Use the Object parameter to specify the object to be checked. Object must be an instance of the component class that is being collected by the collection.

Key parameter


Key parameter

Use the Key parameter to specify the key of the object to be checked.


Insert method

Insert adds an item to a collection

Use the Insert method to add an item to a collection.

This statement adds button #PHBN_1 to the collection:

Invoke Method(#Collection.Insert) Item(#Phbn_1)

This statement inserts component #PHBN_2 to a position identified by the Key parameter:

Invoke Method(#Collection.Insert) Key(#Key) Item(#PHBN_2)

The parameters of the Insert method are different for different collection types:

  • For keyed collections the position of the inserted item is identified by the Key value.
  • Other collections have other methods (InsertAfter, InsertFirst etc.) for inserting an item to a specific position.
  • Key parameter for insertion
  • Item parameter


Key parameter for insertion

Use the Key parameter to specify the key position in which the item is to be inserted:

This statement inserts component #PHBN_1 to the key position specified by field #LastIndex:

Invoke Method(#Collection.Insert) Key(#LastIndex) Item(#PHBN_1)


Item parameter

Use the Item parameter to specify the item to be inserted in the collection.


InsertAfter method

InsertAfter adds an item to a collection after a specified item

Use the InsertAfter method to add an item to a collection after a specified item.

This statement adds button #PHBN_1 to the collection after an item which has a specified index number:

Invoke Method(#Collection.InsertAfter) Item(#Phbn_1) Index(#Index.Value)

  • Item parameter
  • Index parameter


Item parameter

Item parameter

Use the Item parameter to specify the item to be inserted in the collection.


Index parameter

Use the Index parameter to specify the index number in the collection after which this item is added.


InsertBefore method

InsertBefore adds an item to a collection before a specified item

Use the InsertBefore method to add an item to a collection before a specified item.

This statement adds button #PHBN_1 to the collection before an item which has a specified index number:

Invoke Method(#Collection.InsertBefore) Item(#Phbn_1) Index(#Index.Value)

  • Item parameter
  • Index parameter


Index parameter

Use the Index parameter to specify the index number in the collection before which this item is added.


InsertFirst method

InsertFirst adds an item in the beginning of the collection

Use the InsertFirst method to add an item to the beginning of a collection.

This statement adds button #PHBN_1 as the first item in the collection:

Invoke Method(#Collection.InsertFirst) Item(#Phbn_1)

Item parameter


InsertLast method

InsertLast adds an item in the end of the collection

Use the InsertLast method to add an item to the end of a collection.

This statement adds button #PHBN_1 as the last item in the collection:

Invoke Method(#Collection.InsertLast) Item(#Phbn_1)

Item parameter


Basic Collection Property

StartingAt parameter

AtEnd property

Current property

CurrentKey property

LastIndexOf property

AllowsDuplicates property

IsEmpty property

IsOrdered property

Item property


StartingAt parameter

Use the StartingAt parameter to specify the position in the collection where to start searching for the object.

This parameter is useful when searching collections that allow duplicates (like arrays and lists) to be able to resume a search after finding an item.

AtEnd property


AtEnd property

AtEnd indicates the end of the collection

The AtEnd property is set to True if the iterator does not have a current item. Every time an iterator is moved, the AtEnd could be tested to determine if there is an item available from the iterator. AtEnd will be True is there is no such item, thus you have reached the end of the collection.

The best way to iterate through a collection is to use the FOR/ENDFOR loop.


Current property

The Current property returns a reference to the current component accessed by the iterator.


CurrentKey property

The CurrentKey property returns the key of the current component accessed by the iterator.


LastIndexOf property

The LastIndexOf property searches the list looking for the last occurrences of a component.


Object parameter

Use the Object parameter to specify the component the last occurrence of which is searched.


AllowsDuplicates property

AllowsDuplicates indicates whether the collection allows duplicates

A read-only property.

Use the AllowsDuplicates property to determine whether the collection allows duplicates.

List and Array collections do not do any checking of duplicates so they support duplicates. For them the value of this property is True.


First property

First is the first item in a collection

Use the First property to access the first item in a collection.

This statement assigns the caption of the first item in the collection to field #STD_DESCS:

Change Field(#STD_DESCS) To('#Collection.First.Caption')


Last property

Last is the Last item in a collection

Use the Last property to access the last item in a collection.

This statement assigns the caption of the last item in the collection to field #STD_DESCS:

Change Field(#STD_DESCS) To('#Collection.Last.Caption')


IndexOf property

IndexOf returns the index number of an item in a collection

Use the IndexOf property to return the index number of an item in a collection.

This statement loops through a collection and assigns the index number of every item to field #STD_COUNT and the caption of the items to field #STD_DESCS and then adds them to a grid:

For Each(#Current) In(#Collection)

Change Field(#STD_COUNT) To('#Collection.IndexOf<#Current>')
Change Field(#STD_DESCS) To('#Current.Caption')
Add_Entry To_List(#GRID_1)
Endfor


Object parameter

Use the Object parameter to specify the object the index of which is to be retrieved.


StartingAt parameter

Use the StartingAt parameter to specify the position in the collection where to start searching for the object.

This parameter is useful when searching collections that allow duplicates (like arrays and lists) to be able to resume a search after finding an item.


IsEmpty property

IsEmpty indicates whether the collection contains any items.

The IsEmpty property indicates whether a collection contains any items.

When this property is True the collection does not contain any items.


IsOrdered property

IsOrdered indicates whether the collection is ordered.

Some collections such as array and list collections maintain the items in a way that enables them to be accessed in that order.

Other collections optimize the storage of the items to meet specific performance objectives:

  • Keyed collections use a balance binary tree to maintain the items. This means the items are retrieved in a sorted sequence based on the value of the items' key.
  • Dictionary collections use a hash table which means the order of the items is totally unpredicatable, so you must use a key to look up dictionaries.


Item property

Use the Item property to access an item in a collection.

Index parameter

ItemCount property

Key parameter to identify


Index parameter

Use the Index parameter to identify the item in the collection.


ItemCount property

Use the ItemCount property to retrieve the number of items in a collection.

The following if statement uses the ItemCount property to check whether the index value specified is within the number of items in the collection:

If Cond('#Index.Value <= #Collection.ItemCount')

Change Field(#STD_COUNT) To('#Index.Value')
Change Field(#STD_DESCS) To('#Collection<#Index>.Caption')
Add_Entry To_List(#GRID_1)
Endif


Key parameter to identify

Use the Key parameter to identify the item in the collection.


Object parameter

Use the Object parameter to identify the Item in the collection.


Set collection

Set collections are an unordered collection of components that cannot contain duplicates.

Also see

Set collection accessor

Set collection iterator


Set collection accessor

An accessor is a component that provides read-only access to the collection.


Set collection iterator

An iterator component enables iteration over the content of the collection.


Sorted array collection

Sorted array collections are a dynamically sized, sorted collection of components that can be located by indexing. Indexing is always relative to 1.

Also see

Sorted array collection accessor

Sorted array collection iterator

Sorted dictionary collection

Sorted dictionary collection accessor

Sorted dictionary collection iterator


Sorted array collection accessor

An accessor is a component that provides read-only access to the collection.


Sorted array collection iterator

An iterator component enables iteration over the content of the collection.


Sorted dictionary collection

Sorted dictionary collections are a collection of key-value component pairs. The collection is sorted by the key component and no duplicates of the key are allowed.


Sorted dictionary collection accessor

An accessor is a component that provides read-only access to the collection.


Sorted dictionary collection iterator

An iterator component enables iteration over the content of the collection.


Component type component

The component type component reflects the type of Visual LANSA component.

Reflection is a facility that enables RDMLX code to look inside a component class when the component class is reflecting itself to the outside world. It can be used in tools that provide design/RDMLX generation facilities which want to interrogate the features of a component type in order to initialise/manipulate the component.

The component type component has properties that provide access to the attributes and features of the component's type. The features of a component type are supplied as collections of Event, Method and Property components. Each of these components describe the attributes and parameters of each feature.


Component Type Component Property

Ancestor property

Events property

IsAbstract property

IsClass property

IsInterface property

IsPrimitive property

IsVariant property

Methods property

Pattern property

Properties property

TypeName property


Ancestor property

Ancestor property is the Component Type of the ancestor

The Ancestor property returns the Component Type component which is the ancestor type of this type of component.

If the component type does not have an ancestor, *NULL is returned.


IsAbstract property

IsAbstract indicates if instances can be created from this component type

The IsAbstract property indicates if this type of component can be used to create instances.

The property is set to True if the type cannot be used to create instances.


IsClass property

The IsClass property indicates if the component type is a class.

If the component type described is a class, this property is set to True.


IsInterface property

The IsInterface property indicates if the component type is an interface.

This property is not currently implemented.


IsPrimitive property

The IsPrimitive property indicates if the component type is a LANSA primitive component type.

This property can have the value True or False.


IsVariant property

The IsVariant property indicates if the component type is a variant.

This property can have the value True or False.


Pattern property

The Pattern property returns a component that is the pattern of this component type.


Properties property

The Properties property is a collection of Property components for the type of component.


Methods property

The Methods property is a collection of Method components for the type of component.


Events property

The Events property is a collection of Event components for the type of component.


TypeName property

The TypeName property returns the name of the component type.


Event component

The event component reflects a Visual LANSA event.

Event component properties


Event component properties

FeatureName property

IsFinal property

OuterFeature property

Parameters property


FeatureName property

The FeatureName property is the name of the event.


IsFinal property

The IsFinal property indicates whether the event can be signalled by descendant classes.

This property is set to True if event cannot be signalled by descendant classes


OuterFeature property

The OuterFeature property is the Component Type component containing the event.


Parameters property

The Parameters property is a collection of Property Event Parameter components describing parameters of the event.


Event parameter component

The event parameter component reflects a Visual LANSA event parameter.

Event parameter component properties


Event parameter component properties

FeatureName property

IsByReference property

IsByValue property

IsInput property

IsMandatory property

IsOutput property

OuterFeature property


FeatureName property

The FeatureName property is the name of the parameter.


IsByReference property

The IsByReference property indicates if the parameter is passed by reference.

This property is set to True if passed by reference.


IsByValue property

IsByValue indicates if the parameter is passed by value

The IsByValue property indicates if the parameter is passed by value.

This property is set to True if the parameter is passed by value; It is set to False if the parameter is passed by reference.


IsInput property

IsInput indicates if the parameter is passed as input.

The IsInput property indicates if the parameter is passed as input to an event handling routine.

This property is set to True if the parameter is passed as input to event handling routine.


IsMandatory property

The IsMandatory property indicates if the parameter is required.

This property is set to True if the parameter is required


IsOutput property

IsOutput indicates if the parameter is passed as output from an event handling routine

The IsOutput property indicates if the parameter is passed as output from an event handling routine.

This property is set to True if the parameter is passed as output from an event handling routine


OuterFeature property

OuterFeature is the Event component for the event parameters

The OuterFeature property is the Event component for the event parameters.


Method component

The method component reflects a Visual LANSA method.

Method component Properties


Method component Properties

FeatureName property

IsFinal property

IsRedefined property

OuterFeature property

Parameters property


FeatureName property

The FeatureName property is the name of the method.


IsFinal property

IsFinal indicates if the method can be redefined by a descendant class

The IsFinal property indicates if the method can be redefined by a descendant class.

This property is set to True if method cannot be redefined by descendant classes.


IsRedefined property

The IsRedefined property indicates if the method redefines an ancestor's method.

This property is set to True if method redefines method from ancestor.


OuterFeature property

OuterFeature is the Component Type component containg the method

The OuterFeature property is the Component Type component containg the method.


Parameters property

Parameters is a collection of Method Parameter components

The Parameters property is a collection of Method Parameter components describing the parameters of the method.


Method parameter component

The method parameter component reflects a Visual LANSA method parameter.

Method parameter component properties


Method parameter component properties

FeatureName property

IsByReference property

IsInput property

IsMandatory property

OuterFeature property

IsResult property

IsByValue property

IsOutput property


FeatureName property

FeatureName is the name of the parameter

The FeatureName property is the name of the parameter.


IsInput property

IsInput indicates if the parameter is passed as input.

The IsInput property indicates if the parameter is passed as input to an method routine.

This property is set to True if the parameter is passed as input to method routine.


OuterFeature property

The OuterFeature property returns the method component for the method parameters.


IsResult property

The IsResult parameter indicates if the parameter is a Result parameter.

This property can have the value True or False.


IsByValue property

The IsByValue property indicates if the parameter is passed by value.

This property is set to True if the parameter is passed by value; It is set to False if the parameter is passed by reference.


IsOutput property

The IsOutput property indicates if the parameter is passed as output from an method routine.

This property is set to True if the parameter is passed as output from an method routine.


Property component

The property component reflects a Visual LANSA property.

Property component properties


Property component properties

FeatureName property

GetParameters property

IsGetKeyed property

IsSetKeyed property

OuterFeature property

SetParameters property


FeatureName property

The FeatureName property is the name of the property.


GetParameters property

GetParameters are the property's GET parameters

The GetParameters property is a collection of Property Parameter components describing the property's GET parameters.


IsGetKeyed property

IsGetKeyed indicates if GET has parameters

The IsGetKeyed property indicates if the property has GET parameters.

This property is set to True if property has parameters (keys) on GET.


IsSetKeyed property

IsSetKeyed indicates if SET has parameters

The IsSetKeyed property indicates if the property has SET parameters.

This property is set to True if property has parameters (keys) on SET.


OuterFeature property

The OuterFeature property is the Component Type component containg the property.


SetParameters property

SetParameters are the property's SET parameters

The SET Parameters property is a collection of Property Parameter components describing the property's SET parameters.


Property parameter component

The property parameter component reflects a Visual LANSA property parameter.

Property parameter component properties


Property parameter component properties

FeatureName property

IsByReference property

IsByValue property

IsInput property

IsMandatory property

IsOutput property

IsResult property

OuterFeature property


IsInput property

The IsInput property indicates if the parameter is passed as input to a property routine.

This property is set to True if the parameter is passed as input to property routine.


IsMandatory property

IsMandatory indicates if the parameter is required

The IsMandatory property indicates if the parameter is required.

This property is set to True if the parameter is required


IsOutput property

The IsOutput property indicates if the parameter is passed as output from a property routine.

This property is set to True if the parameter is passed as output from a property routine


IsResult property

The IsResult parameter indicates if the parameter is a Result parameter.


OuterFeature property

The OuterFeature property is the Property component for the property parameters.


Meta pattern component

The Meta pattern component type is the pattern for all patterns in the Visual LANSA schema. It contains classes describing the types of Visual LANSA's Forms, Reusable, Field, Bitmap, Icon, Cursor, ActiveX and Web patterns.


Message component

Message component is a collection of messages in a status bar

The Message component is a collection of messages in the status bar. You can access the Message component using the Messages property of the status bar.

This Click event code iterates through the Messages collection and adds the first level message text to a list:

Evtroutine Handling(#STbr_1.click) Options(*NOCLEARERRORS *NOCLEARMESSAGES)

For Each(#Message) In(#stbr_1.messages)
Change Field(#STD_TEXT) To('#MESSAGE.FIRSTLEVELTEXT')
Add_Entry To_List(#TRACE)
Endfor
Endroutine

FirstLevelText property

HasSecondLevelText property

SecondLevelText property


FirstLevelText property

The FirstLevelText property is the message text.


HasSecondLevelText property

The HasSecondLevelText indicates whether a message has second level text. This property can be True or False.


SecondLevelText property

The SecondLevelText property is the message description.


Primitive collection

The LANSA Primitive Collection (PRIM_PCOL) is the basis of all collection components.

You can get access to the items in any collection using the FOR/ENDFOR loop.

For example this Click event iterates through the items collection for submenu #SMNU_1 and disables them:

Evtroutine Handling(#PHBN_1.Click)

For Each(#Current) In(#smnu_1.Items)
Set Com(#Current) Enabled(False)
Endfor
Endroutine


Primitive Iterator component

An iterator component enables iteration over the content of the collection.


Variant Component

SetValue Property


SetValue Property

Sets the Value of a variant. The Result is TRUE if assignment succeeded, otherwise it is FALSE.

RESULT

Boolean indicating if set was successful (TRUE)

VALUE

Value to be set.

Example

Define_Com Class(#PRIM_VAR) Name(#myVariant)

#myVariant.SetValue( "123.45" )


DefaultPicklist property

DefaultPicklist makes the picklist the default picklist

Use the DefaultPicklist property to specify whether this picklist is used by default if the field's component definition contains more than one picklist.

Set this property to True to use this picklist as the default.


DefaultPrompter property

DefaultPrompter makes the prompter the default prompter

Use the DefaultPrompter property to specify whether this prompter is used by default if the field's component definition contains more than one prompter.

Set this property to True to use this prompter as the default.


DefaultVisual property

DefaultVisual makes the visualization the default visualization

Use the DefaultVisual property to specify whether this visualization is used by default if the field's component definition contains more than one visualization.

Set this property to True to use this visualization as the default.

Note that when a field is used in a list or grid, the default visualization is ignored. The appearance of the field in the list or grid is determined by the DisplayAppearance and EditAppearance of the column.


Desktop application component class

Desktop application component is a component class defining features of Visual LANSA Desktop Application component.

At runtime, use the #SYS_APPLN variable name to access the object that represents your running application.

Desktop application properties

Desktop application methods

Desktop application properties


Desktop application methods

CaptureDesktop method

CaptureWindow method

CaptureWindowResult parameter

CaptureWindowFileName parameter

CaptureWindowControl parameter


CaptureDesktop method

Use the CaptureDesktop methods to capture a bitmap of the desktop and save the bitmap to a file.

Copy and paste this example to see how the CaptureDesktop methods works:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Capture Screen') Clientheight(532) Clientwidth(567) Componentversion(1) Formposition(ScreenCenter) Framestyle(Dialog) Height(586) Layoutmanager(#ATLM_1) Left(204) Menubar(#MBAR_1) Top(149) Width(575)
* Menu definition
Define_Com Class(#PRIM_MBAR) Name(#MBAR_1) Parent(#COM_OWNER)
Define_Com Class(#PRIM_MITM) Name(#MITM_1) Caption('File') Displayposition(1) Parent(#MBAR_1)
Define_Com Class(#PRIM_SMNU) Name(#SMNU_1) Parent(#MITM_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_SCREEN) Caption('Capture Desktop') Displayposition(1) Parent(#SMNU_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_ACTIVE) Caption('Wait 5 seconds and capture Active window') Displayposition(2) Parent(#SMNU_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_TAB) Caption('Capture Tab contents') Displayposition(3) Parent(#SMNU_1)
* File name edit
Define_Com Class(#STD_TEXT.Visual) Name(#STD_TEXT) Caption('File name') Displayposition(1) Height(19) Labeltype(Caption) Left(8) Marginleft(75) Parent(#COM_OWNER) Tabposition(1) Top(12) Usepicklist(False) Width(313)
* Timer for active window capture delay
Define_Com Class(#prim_timr) Name(#timer) Interval(5000)
* Tab, Sheets and Contents for SYS_APPL.CaptureScreen Control testing
Define_Com Class(#PRIM_TAB) Name(#TAB_1) Displayposition(2) Height(463) Left(0) Parent(#COM_OWNER) Tabposition(2) Top(69) Width(567)
Define_Com Class(#PRIM_IMGE) Name(#IMAGE) Displayposition(1) Height(437) Left(0) Parent(#TBSH_RESULT) Tabposition(1) Top(0) Width(559)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_RESULT) Caption('Results') Displayposition(1) Height(437) Layoutmanager(#ATLM_1) Left(4) Parent(#TAB_1) Tabposition(1) Tabstop(False) Top(22) Width(559)
* Form Layout
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#IMAGE) Parent(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_2) Attachment(Bottom) Manage(#TAB_1) Parent(#ATLM_1)
Evtroutine Handling(#MITM_SCREEN.Click)
* Capture the screen
#sys_appln.capturedesktop( #std_text )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
Evtroutine Handling(#MITM_ACTIVE.Click)
* Start timer (will tick 5 seconds later and capture the active window )
#timer.start
Endroutine
Evtroutine Handling(#MITM_TAB.Click)
* Capture the sheet contents
#sys_appln.capturewindow( #std_text #TAB_1 )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
* Initialize form
#IMAGE.filename := ""
#std_text := "c:\Bitmap.bmp"
#timer.stop
Endroutine
Evtroutine Handling(#timer.Tick) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
* Stop the timer
#timer.stop
* Capture the foreground window
#sys_appln.capturewindow( #std_text )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
End_Com


CaptureWindow method

Capture an image of the active window

Use the CaptureWindow method to capture a bitmap of the active window or a control and save the bitmap to a file.

Copy and paste this example to see how the CaptureWindow methods works:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Capture Screen') Clientheight(532) Clientwidth(567) Componentversion(1) Formposition(ScreenCenter) Framestyle(Dialog) Height(586) Layoutmanager(#ATLM_1) Left(204) Menubar(#MBAR_1) Top(149) Width(575)
* Menu definition
Define_Com Class(#PRIM_MBAR) Name(#MBAR_1) Parent(#COM_OWNER)
Define_Com Class(#PRIM_MITM) Name(#MITM_1) Caption('File') Displayposition(1) Parent(#MBAR_1)
Define_Com Class(#PRIM_SMNU) Name(#SMNU_1) Parent(#MITM_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_SCREEN) Caption('Capture Desktop') Displayposition(1) Parent(#SMNU_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_ACTIVE) Caption('Wait 5 seconds and capture Active window') Displayposition(2) Parent(#SMNU_1)
Define_Com Class(#PRIM_MITM) Name(#MITM_TAB) Caption('Capture Tab contents') Displayposition(3) Parent(#SMNU_1)
* File name edit
Define_Com Class(#STD_TEXT.Visual) Name(#STD_TEXT) Caption('File name') Displayposition(1) Height(19) Labeltype(Caption) Left(8) Marginleft(75) Parent(#COM_OWNER) Tabposition(1) Top(12) Usepicklist(False) Width(313)
* Timer for active window capture delay
Define_Com Class(#prim_timr) Name(#timer) Interval(5000)
* Tab, Sheets and Contents for SYS_APPL.CaptureScreen Control testing
Define_Com Class(#PRIM_TAB) Name(#TAB_1) Displayposition(2) Height(463) Left(0) Parent(#COM_OWNER) Tabposition(2) Top(69) Width(567)
Define_Com Class(#PRIM_IMGE) Name(#IMAGE) Displayposition(1) Height(437) Left(0) Parent(#TBSH_RESULT) Tabposition(1) Top(0) Width(559)
Define_Com Class(#PRIM_TBSH) Name(#TBSH_RESULT) Caption('Results') Displayposition(1) Height(437) Layoutmanager(#ATLM_1) Left(4) Parent(#TAB_1) Tabposition(1) Tabstop(False) Top(22) Width(559)
* Form Layout
Define_Com Class(#PRIM_ATLM) Name(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Center) Manage(#IMAGE) Parent(#ATLM_1)
Define_Com Class(#PRIM_ATLI) Name(#ATLI_2) Attachment(Bottom) Manage(#TAB_1) Parent(#ATLM_1)
Evtroutine Handling(#MITM_SCREEN.Click)
* Capture the screen
#sys_appln.capturedesktop( #std_text )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
Evtroutine Handling(#MITM_ACTIVE.Click)
* Start timer (will tick 5 seconds later and capture the active window )
#timer.start
Endroutine
Evtroutine Handling(#MITM_TAB.Click)
* Capture the sheet contents
#sys_appln.capturewindow( #std_text #TAB_1 )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
* Initialize form
#IMAGE.filename := ""
#std_text := "c:\Bitmap.bmp"
#timer.stop
Endroutine
Evtroutine Handling(#timer.Tick) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
* Stop the timer
#timer.stop
* Capture the foreground window
#sys_appln.capturewindow( #std_text )
* Update image
#IMAGE.filename := ""
#IMAGE.filename := #std_text
Endroutine
End_Com


CaptureWindowResult parameter

The CaptureWindow method returns a Boolean True if the capture screen was successful and the bitmap file was created , otherwise it returns a Boolean False.


CaptureWindowFileName parameter

The file to which the captured screen is to be saved.


CaptureWindowControl parameter

The control for which to CaptureWindow. No value for this parameter will capture the active desktop window.


Desktop application properties

VirtualScreenLeft

VirtualScreenTop

VirtualScreenWidth

VirtualScreenHeight

EnsureVisibleForms

PrimaryMonitor

Monitors

ScalingFactorHor property

ScalingFactorVer property

ScreenHeight property

ScreenWidth property

ComponentForms property

Disable Process Ghosting Property

Themes


VirtualScreenLeft

The virtual screen is the bounding rectangle of all display monitors. The VirtualScreenLeft property provides the coordinates for the left side of the virtual screen.


VirtualScreenTop

The virtual screen is the bounding rectangle of all display monitors. The VirtualScreenTop property provides the coordinates for the top side of the virtual screen.


VirtualScreenWidth

The virtual screen is the bounding rectangle of all display monitors. The VirtualScreenWidth property provides the coordinates for the width of the virtual screen.


VirtualScreenHeight

The virtual screen is the bounding rectangle of all display monitors. The VirtualScreenHeight property provides the coordinates for the height of the virtual screen.


EnsureVisibleForms

To cater for the unplugging of a secondary monitor or a corrupt monitor registry setting, you can use the SYS_APPLN.EnsureVisibleForms and PRIM_FORM.EnsureVisible properties. When this property is set to True and a monitor is no longer available when registry values for the form are loaded, the form is moved back into the virtual screen. Note this only applies to before the form is realized.

An easy means of turning on the EnsureVisible functionality for your whole application is to set the SYS_APPLN.EnsureVisibleForms property to True.

Forms automatically map to the monitor of its owner form.


PrimaryMonitor

Provides access to the Primary Monitor attached to the operating system.


Monitors

Provides access to a collection containing all Monitors attached to the operating system.


ScalingFactorHor property

The ScalingFactorHor returns the current horizontal scaling factor of the desktop currently running the application.


ScalingFactorVer property

The ScalingFactorVer returns the current vertical scaling factor of the desktop currently running the application.


ScreenHeight property

The ScreenHeight property provides the coordinates for the height of the primary monitor in pixels.


ScreenWidth property

The ScreenWidth property provides the coordinates for the width of the primary monitor in pixels.


ComponentForms property

The ComponentForms property provides access to a collection containing all the realized forms in the running application.


CloseAllForms method

Use the CloseAllForms method to close all forms and unrealize any realized but not showing forms. Calling this method will end the application.


CaptureDesktopResult parameter

The CaptureDesktop method returns a Boolean True if the capture screen was successful and the bitmap file was created , otherwise it returns a Boolean False.


CaptureDesktopFileName parameter

CaptureDesktop.FileName parameter

The file to which the captured screen is to be saved.


Disable Process Ghosting Property

Window ghosting is a Windows Manager feature that lets the user minimize, move, or close the main window of an application that is not responding.

Use the DisableProcessGhosting property to disable post-Windows 2000 systems ghosting functionality.


WheelOnMouse property

Use the WheelOnMouse property to specify whether or not the mouse wheel works on the control under the mouse regardless of whether or not the control has the focus.

By default the property is True.


Themes

Refer to Themes in the Visual LANSA Developer's Guide, for details about this feature and enabling information.

#Sys_Appln.Theme
  • Classic (the default)
  • Shell
  • 2007Blue
  • 2007Silver
  • 2007Obsidian
  • 2007Olive
  • 2003Blue
  • 2003Silver
  • 2003Olive
  • 2003Color

The Shell Theme will query the Operating System and choose the best match. (That is, it will follow the Blue\Olive\Silver settings of your Windows PC).

2003Color Theme will allow you to customize the Office2003 theme colors. (See Theme 2003 Colors for details).

Also see

Themes

Theme 2003 Colors

Theme Operating System

Theme Style Property

Theme Draw Style Property


Themed Forms

Refer to Themes in the Visual LANSA Developer's Guide, for details about this feature and enabling information.

#Sys_Appln.ThemedForms
  • True
  • False

By default all Forms of an application are not theme enabled.

To be ThemeEnabled, each Form must be individually set to ThemeStyle=Themed.

Alternatively, #Sys_Appln.ThemedForms can be used to switch the default behaviour of all Forms. So by setting #Sys_Appln.ThemedForms := True, all Forms in the application will use the Theme specified by #Sys_Appln.Theme property.

Ý Themes


Theme 2003 Colors

#Sys_Appln.Theme2003Color1

#Sys_Appln.Theme2003Color2

#Sys_Appln.Theme2003Colors

  • Pumpkin
  • Rose
  • EggPlant
  • RainyDay
  • Spruce
  • Lilac

#Sys_Appln.ThemeType := 2003Color allows you to customize the Office2003 theme colors. Further, you need to supply the base-color and highlight-color values:

  • #Sys_Appln.Theme2003Color1 is used as the base color for all backgrounds
  • #Sys_Appln.Theme2003Color2 is used as the base color for all highlighting.

Alternatively, the #Sys_Appln.Theme2003Colors can be used to initialize #Sys_Appln.Theme2003Color1 and #Sys_Appln.Theme2003Color2. Refer to Using Themes in the Developer's Guide for an example of how they are used.

Ý Themes


Theme Operating System

#Sys_Appln.OperatingSystem

Query the OperatingSystem property in order to find the current platform at program runtime

  • Unknown
  • Windows95
  • Windows98
  • WindowsME
  • WindowsNt4
  • Windows2000
  • WindowsXp
  • WindowsVista

Ý Themes


Theme Style Property
  • None
  • Parent
  • Themed
  • Application

The ThemeStyle property of controls (note, not all controls) allows a control to change its Theme appearance. By default, all controls follow the Theme Style of their parent and can only be themed if their parent form is themed.

Switching a Control (eg. Panel) to ThemeStyle := None will paint the panel without a Theme on a theme-enabled Form.

Note that setting a control to ThemeStyle := Themed will only have an effect if the Form itself is theme-enabled.

Also see

Form Theme Style

Control Theme Style

Ý Themes


Form Theme Style

LPVOFormThemeStyle

The ThemeStyle property used together with the Sys_Appln.Theme properties defines the base UI Theme appearance for a Form:

None | No Theme is applied
Application | The Theme is inherited from Sys_Appln.Theme when Sys_Appln.ThemedForms equals true
Owner | The Theme is inherited from the Forms OwnerForm
Themed | The Sys_Appln.Theme Theme will be applied


Control Theme Style

LPVOControlThemeStyle

The ThemeStyle property used together with the Sys_Appln.Theme properties defines the base UI Theme appearance for a Control

None | No Theme is applied
Parent | The Theme is inherited from the visual Parent of the control
Themed | The Sys_Appln.Theme Theme will be applied

Ý Themes


Theme Draw Style Property
  • None
  • Standard
  • Image
  • Toolbar
  • DarkTitle
  • MediumTitle
  • LightTitle

Slightly different appearances are required to get the best results from Visual LANSA themes. The most obvious case is where group boxes and panels have been used as toolbars in applications. Some themes display a control background that is too dark (eg. The 2007Obsidian theme) and causes icons not to look good. For such cases ThemeDrawStyle will cause controls to display differently.

  • For controls used as Toolbars, a ThemeDrawStyle = Toolbar will result in a much better appearance.
  • Also the theming of container controls (for example, Panel ) that take up a large portion of the screen can be improved by specifying ThemeStyle := Image. Note that ThemeStyle := Image only has an effect when used with the 2007 Themes.
  • DarkTitle, MediumTitle and LightTitle are to be used for labels that are required to stand out in a Form and look correct for the application's theme. They can also be used in places where visualstyle colors have been used to try and mimic theme behaviour in Visual LANSA applications.

Ý Themes


Component proxy component

Component proxy is the Ancestor class of non-visual ActiveX components.

For LANSA Product Centre's internal use only.

Component Proxy Properties

Component Proxy Event


Component Proxy Properties

ProgID property

TypeLibId property

ComponentOnFailure property

ComponentOnSuccess property


TypeLibId property

The TypeLibId property specifies the type library for the ActiveX component being enrolled.

The purpose of the type library is to provide an interface which lets applications interface with the ActiveX component. The library describes in detail the classes in the component and their methods, properties, events, constants etc.

Tag:LpComComponentProxyComponentOnFailureHelp

Parent:'Com Components'


ComponentOnFailure property

ComponentOnFailure property controls the behaviour of an application when an instance of ActiveX component flags a Failure Com Error.

Allowed values are:

Continue: Resumes normal execution of the application.

SignalError: Signals the ComponentError event of the failing ActiveX component. Once control returns from handling the event, normal execution of the application is resumed.

Abort: Reports the Com Error before aborting the application.

The default is Abort.

The value assigned to Repository definition of the ActiveX is used to initialize each instance of the ActiveX. The value of this property can be modified as the program executes.


ComponentOnSuccess property

ComponentOnSuccess property controls the behavior of an application when an instance of ActiveX component flags a Success (or informational) Com Error.

Allowed values are:

Continue: Resumes normal execution of the application.

SignalError: Signals the ComponentError event of the failing ActiveX component. Once control returns from handling the event, normal execution of the application is resumed.

Abort: Reports the Com Error before aborting the application.

The default is Continue.

The value assigned to Repository definition of the ActiveX is used to initialize each instance of the ActiveX. The value of this property can be modified as the program executes.


Component Proxy Event

ComponentError event


ComponentError event

ComponentError event is signalled by an ActiveX component when an interaction with component raised a Com Error that was flagged to be processed by the SignalEvent action code.

A ComponentError event is signaled when a Failure Com Error is flagged and the ActiveX component has ComponentOnFailure set to SignalError.

A ComponentError event is signaled when a Success Com Error is flagged and the ActiveX component has ComponentOnSuccess set to SignalError.


Control container component

Control container component is the Ancestor of non-composite, visual ActiveX components.

For LANSA Product Centre's internal use only.


Composite container Class

Composite container component is the Ancestor of composite, visual ActiveX components.

For LANSA Product Centre's internal use only.


Draglist

Draglist properties


Draglist properties

Listview DraglistStyle

Listview Dragimage


Listview DraglistStyle

If DragListStyle is set to Image and its DragImage is set to an image in the repository, the image is attached to the cursor while dragging.

If DragListStyle is set to Selection, a snapshot of the selected items in the control is attached to the cursor while dragging.


Listview Dragimage

If DragListStyle is set to Image and its DragImage is set to an image in the repository, the image is attached to the cursor while dragging.

If DragListStyle is set to Selection, a snapshot of the selected items in the control is attached to the cursor while dragging.


DateTime picker

Use the date and time picker to let the user to select a date or a time.

The value returned by the picker is a DateTime field.

You can copy and paste this example to see how the date and time picker works:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('DateTime Tester') Clientheight(127) Clientwidth(489) Componentversion(1) Formposition(ScreenCenter) Height(163) Left(445) Top(147) Width(505)
Define_Com Class(#PRIM_DTIM) Name(#DATETIME) Displayposition(1) Height(25) Hint('Test Hint') Left(8) Parent(#COM_OWNER) Tabposition(4) Top(16) Visualstyle(#VS_NORM) Width(265)
Define_Com Class(#PRIM_DTIM) Name(#MIN) Displayposition(3) Height(25) Left(72) Parent(#COM_OWNER) Tabposition(2) Top(56) Width(120)
Define_Com Class(#PRIM_DTIM) Name(#MAX) Displayposition(2) Height(25) Left(72) Parent(#COM_OWNER) Tabposition(1) Top(88) Width(120)
Define_Com Class(#PRIM_LABL) Name(#LABL_1) Caption('Min Date') Displayposition(5) Height(25) Left(8) Parent(#COM_OWNER) Tabposition(5) Tabstop(False) Top(56)
Define_Com Class(#PRIM_LABL) Name(#LABL_2) Caption('Man Date') Displayposition(4) Height(22) Left(8) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(88)
Define_Com Class(#PRIM_GPBX) Name(#GPBX_1) Caption('Format') Displayposition(6) Height(108) Left(288) Parent(#COM_OWNER) Tabposition(6) Tabstop(False) Top(8) Width(185)
Define_Com Class(#PRIM_RDBN) Name(#RDBN_1) Buttonchecked(True) Caption('SystemLongDate') Displayposition(1) Height(17) Left(8) Parent(#GPBX_1) Tabposition(1) Top(16)
Define_Com Class(#PRIM_RDBN) Name(#RDBN_2) Caption('UserTime') Displayposition(2) Height(15) Left(8) Parent(#GPBX_1) Tabposition(2) Top(82)
Define_Com Class(#PRIM_RDBN) Name(#RDBN_3) Caption('SystemDate') Displayposition(3) Height(17) Left(8) Parent(#GPBX_1) Tabposition(3) Top(32)
Define_Com Class(#PRIM_RDBN) Name(#RDBN_4) Caption('UserDate') Displayposition(4) Height(17) Left(8) Parent(#GPBX_1) Tabposition(4) Top(64)
Define_Com Class(#PRIM_RDBN) Name(#RDBN_5) Caption('SystemTime') Displayposition(5) Height(17) Left(8) Parent(#GPBX_1) Tabposition(5) Top(48)

Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#DATETIME) Value(*DateTime)

Set Com(#MIN) Value(#DATETIME.mindate)
Set Com(#MAX) Value(#DATETIME.maxdate)

Set Com(#DATETIME) Dateformat(SystemLongDate)
Endroutine

Evtroutine Handling(#RDBN_1.Click)
* Set SystemLongDate
Set Com(#DATETIME) Dateformat(SystemLongDate)
Endroutine
Evtroutine Handling(#RDBN_2.Click)
* Set SystemShortDate
Set Com(#DATETIME) Dateformat(SystemDate)
Endroutine
Evtroutine Handling(#RDBN_3.Click)
* Set SystemTime
Set Com(#DATETIME) Timeformat(SystemTime)
Endroutine
Evtroutine Handling(#RDBN_4.Click)
* Set UserShortDate
Set Com(#DATETIME) Dateformat(UserDate)
Endroutine
Evtroutine Handling(#RDBN_5.Click)
* Set UserTime
Set Com(#DATETIME) Timeformat(UserTime)
Endroutine

Evtroutine Handling(#MIN.Changed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#DATETIME) Mindate(#MIN.Value)
Endroutine
Evtroutine Handling(#MAX.Changed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#DATETIME) Maxdate(#MAX.Value)
Endroutine
End_Com

DisplayAsUTC property

Checkbox property

Checked property

CustomDateFormat property

CustomTimeFormat property

DateFormat property

TimeFormat property

FormatText property

ShowDate property

ShowDateButton property

ShowTime property

ShowTimeButton property

Format property

MaxDate property

MinDate property

Value property


DisplayAsUTC property

DisplayAsUTC controls whether the default date and time formatting displays as UTC

Use the DisplayAsUTC property to indicate the default date and time formatting should display as UTC.

Note: This property only applies to date time controls which have no DataClass attached.


Checkbox property

Checkbox controls whether the date and time picker is enabled

Use the Checkbox property to display a check box in the date and time picker. When the check box is selected, the value in the date and time control can be changed.


Checked property

Checked indicates whether the check box is selected

The Checked property indicates whether the check box in the date and time picker is selected or not.

This property is only applicable when the CheckBox property of the picker is set to true.


CustomDateFormat property

Use the CustomDateFormat property to specify a custom date format.

The allowable values for custom format, using sample date 2004/02/28 are:

Year formats:

Y = 4

YY = 04

YYY = 2004

Month formats:

M = 2

MM = 02

MMM = Feb

MMMM = February

Day formats:

D = 28

DD = 28 (includes leading 0)

DDD = Sat

DDDD = Saturday


CustomTimeFormat property

Use the CustomTimeFormat property to specify a custom time format.

The allowable values for custom format, using sample time 23:55:03.004.003.002, are:

Hour formats:

h = 11

hh = 11 (includes leading 0)

H = 23

HH = 23 (includes leading 0)

Minute formats:

m = 55

mm = 55 (includes leading 0)

Second formats:

s = 3

ss = 03 (includes leading 0)

Milli-second formats:

f = 4

ff = 04

fff = 004

Micro-second formats:

u = 3

uu = 03

uuu = 003

Nano-second formats:

n = 2

nn = 02

nnn = 002

t = "A" or "P"

tt = "AM" or "PM"


DateFormat property

Use the DateFormat property to select a predetermined format or specify to use a customformat which is specified using the CustomDateFormat property.

The predetermined formats are:

UserDate - Date format string as defined by the user locale (can be viewed in regional setting of control panel)

UserLongDate - Long Date format string as defined by the user locale (can be viewed in regional setting of control panel)

SystemDate - System locale equivalent of UserDate

SystemLongDate - System locale equivalent of UserLongDate


TimeFormat property

Use the TimeFormat property to select a predetermined format or specify to use a customformat which is specified using the CustomTimeFormat property.

The predetermined formats are:

UserTime - Time format string as defined by the user locale (can be viewed in regional setting of control panel)

SystemTime - System locale equivalent of UserTime


FormatText property

The FormatText property is a read-only property provided to give a view of how the datetime is currently formatting. By default datetimes are displayed in Windows-defined format. To see the actual format use FormatText.


ShowDate property

Use the ShowDate property to show or hide the date portion of the datetime field. The value of this property can be True or False.


ShowDateButton property

Use the ShowDateButton property to show or hide the date button of the datetime field.


ShowTime property

Use the ShowTime property to show or hide the time portion of the datetime field. The value of this property can be True or False.


ShowTimeButton property

Use the ShowTimeButton property to show or hide the time button of the datetime field.


Format property

Format property controls the display of date and time

Use the Format property to control how dates and times are displayed:

  • LongDate is displayed: Monday, January 01, 1900
  • LongDateTime is displayed: Monday, January 01, 1900 12:00:00 AM.
  • ShortDate is displayed: 1/ 1/1900
  • ShortDateTime is displayed: 1/ 1/1900 12:00:00 AM
  • Time is displayed: 12:00:00 AM.


MaxDate property

MaxDate sets the maximum date and time that can be specified

Use the MaxDate property to set the maximum date and time that can be specified in the date control.


MinDate property

MinDate sets the minimum date and time that can be specified

Use the MinDate property to set the minimum date and time that can be specified in the date control.


Value property

Value sets or retrieves the date and time

Use the Value property to set or retrieve the date and time in the date and time picker.

The value returned is in the format DateTime.


Calendar

Use the calendar control to help the user select a date.

The value returned by the calendar is a Date field.

You can copy and paste this example to see how the calendar works:

Function Options(*DIRECT)

Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('calendar Tester') Clientheight(272) Clientwidth(545) Componentversion(1) Formposition(ScreenCenter) Height(308) Left(485) Top(150) Width(561)
Define_Com Class(#PRIM_MTCL) Name(#calendar) Displayposition(6) Height(224) Left(8) Parent(#COM_OWNER) Tabposition(6) Top(8) Visualstyle(#VS_LAREM) Width(260)
Define_Com Class(#PRIM_DTIM) Name(#MIN) Displayposition(3) Height(25) Left(368) Parent(#COM_OWNER) Tabposition(3) Top(120) Width(120)
Define_Com Class(#PRIM_DTIM) Name(#MAX) Displayposition(1) Height(25) Left(368) Parent(#COM_OWNER) Tabposition(1) Top(160) Width(120)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_TODAY) Buttonstate(Checked) Caption('Show today''s date') Displayposition(7) Height(20) Left(288) Parent(#COM_OWNER) Tabposition(7) Top(8) Width(145)
Define_Com Class(#PRIM_CKBX) Name(#CKBX_TODAYCIRCLE) Buttonstate(Checked) Caption('Show today''s date circled') Displayposition(5) Height(20) Left(288) Parent(#COM_OWNER) Tabposition(5) Top(32) Width(145)

Define_Com Class(#PRIM_LABL) Name(#LABL_1) Caption('Minimum date:') Displayposition(4) Height(25) Left(288) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(120) Width(73)
Define_Com Class(#PRIM_LABL) Name(#LABL_2) Caption('Maximum date:') Displayposition(2) Height(22) Left(288) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(160) Width(73)

Define_Com Class(#PRIM_LABL) Name(#LABL_3) Caption('Start of week') Displayposition(9) Height(15) Left(288) Parent(#COM_OWNER) Tabposition(9) Tabstop(False) Top(88) Width(65)
Define_Com Class(#PRIM_CMBX) Name(#CMBX_1) Autoselectitem(False) Componentversion(1) Displayposition(8) Height(18) Left(368) Parent(#COM_OWNER) Showselection(False) Showselectionhilight(False) Tabposition(8) Top(88) Width(121)
Define_Com Class(#PRIM_CBCL) Name(#CBCL_1) Displayposition(1) Parent(#CMBX_1) Source(#STD_TEXT)

Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#MIN) Value(#calendar.mindate)
Set Com(#MAX) Value(#calendar.maxdate)
Set Com(#CMBX_1) Value(#calendar.Startofweek)

Change Field(#std_text) To('''MONDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''TUESDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''WEDNESDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''THURSDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''FRIDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''SATURDAY''')
Add_Entry To_List(#CMBX_1)
Change Field(#std_text) To('''SUNDAY''')
Add_Entry To_List(#CMBX_1)

Change Field(#std_text) To(#calendar.StartOfWeek)
Endroutine
Evtroutine Handling(#CKBX_TODAY.Click)
If Cond('#CKBX_TODAY.buttonstate = Checked')
Set Com(#calendar) Showtoday(True)
Else
Set Com(#calendar) Showtoday(False)
Endif
Endroutine
Evtroutine Handling(#CKBX_TODAYCIRCLE.Click)
If Cond('#CKBX_TODAYcircle.buttonstate = Checked')
Set Com(#calendar) Showtodaycircle(True)
Else
Set Com(#calendar) Showtodaycircle(False)
Endif
Endroutine

Evtroutine Handling(#MIN.Changed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#calendar) Mindate(#MIN.Value)
Endroutine
Evtroutine Handling(#MAX.Changed) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#calendar) Maxdate(#MAX.Value)
Endroutine
Evtroutine Handling(#CMBX_1.ComboChanged) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#calendar) Startofweek(#std_text)
Endroutine
End_Com

MaxDate property

MinDate property

ShowToday property

ShowTodayCircle property

StartOfWeek property

Value property


MaxDate property

Use the MaxDate property to set the maximum date that can be specified in the calendar.


MinDate property

Use the MinDate property to set the minimum date that can be specified in the calendar.


ShowToday property

Use the ShowToday property to control whether today's date is shown.

This property can be True or False.


ShowTodayCircle property

ShowTodayCirle controls whether today's date is circled

Use the ShowTodayCircle property to control whether today's date is circled in the calendar.

This property can be True or False.


StartOfWeek property

Use the StartOfWeek property to specify the weekday which is to be used as the first day of the week in the calendar.

You can specify any weekday as the start of week.


Value property

Value sets or retrieves the date

Use the Value property to set or retrieve the date in the calendar.


Attribute base class

Attribute base class.

For LANSA Product Centre's internal use only.


Interface proxy base class

Interface proxy base class.

For LANSA Product Centre's internal use only.


Contextual message set component

Contextual message set component.

For LANSA Product Centre's internal use only.


Calendar control base class

Calendar control base class

For LANSA Product Centre's internal use only.


Multi-line edit box base class

Multi-line edit box base class.

For LANSA Product Centre's internal use only.


Progress bar base class

Progress bar base class.

For LANSA Product Centre's internal use only.


Spin edit box base class

Spin edit box base class.

For LANSA Product Centre's internal use only.


Data class DateTime

For LANSA Product Centre's internal use only.


Track bar base class

For LANSA Product Centre's internal use only.


WAM base class

For LANSA Product Centre's internal use only.


WAM Base Events

SessionInvalid event


SessionInvalid event

SessionInvalid event is sent if the user session is invalid

The SessionInvalid event is signalled if activity is attempted when a session is invalid.

Parameters :

SenderName - indicates the WebRoutine that caused the SessionInvalid event to be signalled.

SessionStatus - indicates the status of the invalid session.

Expired - means the session has expired.

Invalid - means the session has been terminated due to errors.

Also see

SenderName parameter


SenderName parameter

SenderName parameter indicates the name of the sending webroutine

The SenderName parameter indicates the WebRoutine that caused the SessionInvalid event to be signalled.


WAM Base Properties

SessionKeyMethod property

SessionTimeout property

SessionStatus property

CheckNumeric Property

LayoutWeblet Property

SessionGroupName property


SessionKeyMethod property

The SessionKeyMethod property determines the Key Method by which this session will maintain its state.

The SessionKeyMethod may be :

  • HiddenField - (Default) A hidden field is used in the HTML source to maintain session state.
  • Cookie - A cookie is used to maintain session state. - URL - A parameter on the URL is used to maintain session state.

This property can only be set at Design Time.


SessionTimeout property

The SessionTimeout property determines the number of seconds a session can be inactive before being timed out.

A value of 0 indicates to use the system default.

This property can only be set at Design Time.


SessionStatus property

The SessionStatus property can be used inside a WebRoutine at run time to indicate an error has occurred and the session should be terminated.

Example :

Set COM(#COM_OWNER) SessionStatus(Invalid)


CheckNumeric Property


LayoutWeblet Property


SessionGroupName property

The SessionGroupName property determines the Session Group to which this WAM will belong.

This property can only be set at Design Time.


Weblet base class

For LANSA Product Centre's internal use only.


Data class base class

Internal system use only.


DateTime library

DateTime library.

Library of date and time functions.

For LANSA Product Centre's internal use only. Use the intrinsic date and time functions instead of importing this library.


DateTime base class

For LANSA Product Centre's internal use only.


Intrinsic function library

Intrinsic methods are used to manipulate the value of fields.

Press F2 to display the Features of the intrinsic function library and choose from the library classes using the Classes drop-down list.


Interface base class

Class for interfaces published by LANSA.

For LANSA Product Centre's internal use only.


Message context base class

For LANSA Product Centre's internal use only.


Number function library

For LANSA Product Centre's internal use only. Use the intrinsic number functions instead of importing this library.


String function library

For LANSA Product Centre's internal use only.

Use the intrinsic string functions instead of importing this library.


Variant function library

Variant function library #PRIM_LIBV.

Function Libraries are defined as a component that contains a set of routines defined using the MthRoutine command. These function library routines can be used in expressions.

Function libraries are introduced into an RDML/RDMLX object by the IMPORT command which is specified immediately after the FUNCTION statement:

FUNCTION OPTIONS(*DIRECT)

Import Libraries(#Prim_Libv) As(#VL)

Once a Function library has been imported, the routines defined in the library can be used in expressions.

The syntax is:

[LibraryName.]#RoutineName( [Parameters] )

This syntax requires that the RoutineName be followed immediately by the left parenthesis that starts the parameters. No imbedded spaces are allowed. Parameters can be specified by position or can be named.


Variant function library methods

VarAsBoolean method

VarAsDate method

VarAsDecimal method

VarAsInteger method

VarAsReference method

VarAsString method

VarType method

VarIsBoolean method

VarIsDate method

VarIsEmpty method

VarIsNull method

VarIsNullReference method

VarIsNumber method

VarIsReference method

VarIsString method

VarType method


VarAsBoolean method

VarAsBoolean returns the Subject variant as a Boolean.

The syntax is:

VarAsBoolean( Subject )

This example disables #PHBN_2 when #PHBN_1 is clicked:

Function Options(*DIRECT)

Import Libraries(#Prim_Libv) As(#VL)
BEGIN_COM ROLE(*EXTENDS #PRIM_FORM *implements #Prim_App.IHelpHandler) CLIENTHEIGHT(141) CLIENTWIDTH(152) COMPONENTTAG('Help for the form') HEIGHT(168) LEFT(681) TOP(135) WIDTH(160)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) DISPLAYPOSITION(1) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(1) TOP(64)
DEFINE_COM CLASS(*Variant) NAME(#MyVariant)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_2) DISPLAYPOSITION(2) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(2) TOP(32)
EVTROUTINE HANDLING(#PHBN_1.Click)
#myvariant := false
set #phbn_2 enabled(#VL.VarAsboolean(#myvariant))
ENDROUTINE
EVTROUTINE HANDLING(#PHBN_2.Click)
set #phbn_2 caption('Clicked')
ENDROUTINE
End_Com


Result parameter

The Result parameter returns the subject variant as a boolean.

The method is typically invoked without explicitly specifying the Result parameter.


Subject parameter

The subject variant on which the method is applied.


VarAsDate method

The VarAsDate method returns the subject variant as a date.

The syntax is:

VarAsDate(subject)


Result parameter

The Result parameter returns the the subject variant as a date.

The method is typically invoked without explicitly specifying the Result parameter.


VarAsDecimal method

VarAsDecimal returns the Subject variant as a decimal number.

The syntax is:

VarAsDecimal( Subject )

This example resizes #PHBN_1 using a variant:
Function Options(*DIRECT)
Import Libraries(#Prim_Libv) As(#VL) BEGIN_COM ROLE(*EXTENDS #PRIM_FORM *implements #Prim_App.IHelpHandler) CLIENTHEIGHT(141) CLIENTWIDTH(152) COMPONENTTAG('Help for the form') HEIGHT(168) LEFT(681) TOP(135) WIDTH(160)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) DISPLAYPOSITION(1) LEFT(24) PARENT(#COM_OWNER) TABPOSITION(1) TOP(64)
DEFINE_COM CLASS(*Variant) NAME(#MyVariant)
EVTROUTINE HANDLING(#PHBN_1.Click)
#myvariant := 50
set #phbn_1 Height(#VL.VarAsDecimal(#myvariant))
ENDROUTINE
End_Com


Result parameter

The Result parameter returns the the subject variant as a decimal.

The method is typically invoked without explicitly specifying the Result parameter.


VarAsInteger method

VarAsInteger returns the Subject variant as an integer.

The syntax is:

VarAsInteger( Subject )


Result parameter

The Result parameter returns the subject variant as integer.

The method is typically invoked without explicitly specifying the Result parameter.


VarAsReference method

VarAsReference returns the subject variant as a component reference.

The syntax is:

VarAsReference( Subject )


Result parameter

The Result parameter returns the subject variant as a component reference.

The method is typically invoked without explicitly specifying the Result parameter.


VarAsString method

VarAsString returns the Subject variant as a string.

The syntax is:

VarAsString( Subject )


Result parameter

The Result parameter returns the the subject variant as a string.

The method is typically invoked without explicitly specifying the Result parameter.


VarType method

VarType method


VarIsBoolean method

The VarIsBoolean method returns a Boolean True if the Subject variant can be converted to a Boolean, otherwise it returns a Boolean False.

The syntax is:

VarIsBoolean( Subject )

This property routine tests if the variable is a Boolean:

Ptyroutine Name(Set_uSignalSelection)

Define_Map For(*input) Class(*variant) Name(#lcVariant)
If Cond(VarIsBoolean( #lcVariant ) *EQ True)
Execute Subroutine(FP_SETB) With_Parms(#USE_NAME uSignalSelection 1 #USE_OCUR #lclVariant.Boolean)
Else
Execute Subroutine(FP_SET) With_Parms(#USE_NAME uSignalSelection 1 #USE_OCUR #LCLVARIANT.String)
Endif


Result parameter

The Result parameter returns a Boolean True if the Subject variant can be converted to a Boolean, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsDate method

The VarIsDate method indicates if the value in the subject variant can be converted to a date.

The method returns either True or False. The syntax is:

VarIsDate( subject)


Result parameter

The Result parameter returns the subject variant as a date.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsEmpty method

VarIsEmpty returns a Boolean True if the Subject variant does not contain a value, otherwise it returns a Boolean False.

VarIsEmpty( Subject )

This statement checks if a value has been assigned to a grid cell:

If (#VL.VarIsEmpty( #grid_1.focusCell.column.EditorPArt ))

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant' 'The variant has not yet been assigned a value.')

Endif


Result parameter

returns a Boolean True if the Subject variant does not contain a value, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsNull method

VarIsNull returns a Boolean True if the Subject variant contains the special Null value, otherwise it returns a Boolean False.

VarIsNull( Subject )

This statement tests if the value in the grid cell is unknown or missing:

If (#VL.VarIsNull( #grid_1.focusCell.value ))

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant' 'The value is unknown or missing.')

Endif


Result parameter

The Result parameter returns a Boolean True if the Subject variant contains the special Null value, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsNullReference method

VarIsNullReference returns a Boolean True if the Subject variant contains a component reference and the reference is the special *NULL component reference, otherwise it returns a Boolean False.

VarIsNullReference( Subject )


Result parameter

The Result parameter returns a Boolean True if the Subject variant contains a component reference and the reference is the special *NULL component reference, otherwise it returns a Boolean False

The method is typically invoked without explicitly specifying the Result parameter.


VarIsNumber method

VarIsNumber returns a Boolean True if the Subject variant can be converted to a number, otherwise it returns a Boolean False.

VarIsNumber( Subject )

This example tests if the value is a number:

If Cond(#VL.VarIsNumber( #MyVariant ) *EQ True)

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant Type' 'The value is a decimal.')

Endif


Result parameter

The Result parameter a Boolean True if the Subject variant can be converted to a number, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsReference method

VarIsReference returns a Boolean True if the Subject variant is a component reference, otherwise it returns a Boolean False.

VarIsReference( Subject )


Result parameter

The Result parameter a Boolean True if the Subject variant is a component reference, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarIsString method

VarIsString returns a Boolean True if the Subject variant can be converted to a string, otherwise it returns a Boolean False.

The syntax is:

VarIsString( Subject )

This if statement tests if the value is a string:

If Cond(#Vl.VarIsString( #myVariant) *EQ True)

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant Type' 'The value is a string.')

Else

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant Type' 'The value is a decimal.')

Endif


Result parameter

The Result parameter a Boolean True if the Subject variant can be converted to a string, otherwise it returns a Boolean False.

The method is typically invoked without explicitly specifying the Result parameter.


VarType method

The VarType method returns the type of the value currently stored in the Subject variant.

The syntax is:

VarType( Subject )

This example checks whether the value returned from a grid is a string:

If Cond(#VL.VarType( #TheValue ) *EQ VarString)

Use Builtin(MESSAGE_BOX_SHOW) With_Args(OK OK Information 'Variant Type' 'The value is a string.')

Endif


Result parameter

The Result parameter returns the the type of value currently stored in the subject variant.

The method is typically invoked without explicitly specifying the Result parameter.


Graph item base class

For LANSA Product Centre's internal use only.


Visual style language base class

For LANSA Product Centre's internal use only.

ShowMessages method

ShowMessageSet method

MessageSetOfFeature property

PrompterActivate event

Form parameter

PrompterDeactivate event


Common Dialogs

Color dialog

Save File dialog

Open File dialog


Color dialog

Use the Color dialog to enable the end-user to select colors.


Color dialog property

ChosenColor property

FullyOpen property

PreventFullOpen property


ChosenColor property

Use the ChosenColor property to set or return the selected color in the dialog.


FullyOpen property

Use the FullyOpen property to specify how the color dialog is shown. When the value of this property is True, the dialog is shown with custom color definitions displayed.


PreventFullOpen property

Set the PreventFullOpen property to True to disable the Define Custom Colors button on the Color dialog.


Color dialog method

Show method


Show method

Use the Show method to show the dialog.

For example:

Invoke Method(#COLORDLG.Show) OKPRESSED(#boolRes) FORMOWNER(#com_self)

FormOwner parameter

OKPressed parameter


FormOwner parameter

Use the FormOwner parameter to specify the form that owns the dialog being shown.


OKPressed parameter

The OKPressed parameter returns True if OK button was clicked on the dialog.


Save File dialog

Use the SaveAs dialog to enable the end-user to save a file.

OverwritePrompt property


OverwritePrompt property

Use the OverwritePrompt property to specify whether a confirmation message should be displayed when overwriting a file.


Open File dialog

Use the Open dialog to enable the end-user to open a file.


Open File dialog method

Show method


Show method

Use the Show method to show the Open dialog.

The following statement shows the Open dialog, specifying that the form itself is the owner of the dialog and that the value of the OKPressed parameter should be returned to #BoolRes:

Invoke Method(#OpenFileDLG.Show) OKPRESSED(#boolRes) FORMOWNER(#com_self)


FormOwner parameter

Use the FormOwner parameter to specify the owner form of the Open dialog.


OKPressed parameter

A read-only parameter.

The OKPressed parameter returns True if the OK button was pressed on the Open dialog.


Add Filter Method

Name

Extension


Name

Use the Name property to specify the name of the filter.


Extension

Use the Extension property to specify the file extension of the files to be shown.


ExplorerStyle property

Use the ExplorerStyle property to specify that any customizations made to the dialog use the new Explorer-style customization methods.

By default, the Open and Save As dialog boxes use the Explorer-style user interface regardless of whether this flag is set. This flag is necessary only if you set MultiSelect to True.

Multiselect property

FilterIndex property

FilterCount property

FileCount property

File property

FileTitle property

InitialDir property

Title property

DefExtension property

FilterCaption property

FilterExtension property

Files property

AddFilter method


Multiselect property

Use the MultiSelect property to specify whether multiple files can be selected at one time.


FilterIndex property

The FilterIndex property is the index to the currently selected File Filter.


FilterCount property

Use the FilterCount property to specify the number of File Filters.


FileCount property

Use the FileCount property to retrieve the number of files selected. This property is zero when one or no files are selected, two when two files are selected etc.


File property

Use the File property as a pointer to a buffer that contains a file name used to initialize the File Name edit control.

If the MultiSelect flag is set and the user selects multiple files, the buffer contains the current directory. If the user selects only one file, the File has the path and file name.


FileTitle property

The FileTitle property returns the file name (with extension) without path information.


InitialDir property

Use the InitialDir property to specify the directory which the dialog initially opens.


Title property

Use the Title property to specify the dialog title.


DefExtension property

Use the DefExtension to specify the extension to be appended to the file name if the user fails to type an extension.

This string can be any length, but only the first three characters are appended. The string should not contain a period (.). If this property does not have a value and the user fails to type an extension, no extension is appended.


FilterCaption property

Use the FilterCaption property to specify a description of a filter, for example "Document files".


FilterExtension property

Use the FilterExtension property to specify the filter pattern (for example, "*.TXT").

To specify multiple filter patterns for a single display string, use a semicolon to separate the patterns (for example, "*.TXT;*.DOC;*.BAK").

A pattern string can be a combination of valid file name characters and the asterisk (*) wildcard character. Do not include spaces in the pattern string.


Files property

The Files property returns an array of files selected when there are 2 or more files selected.


AddFilter method

Use the AddFilter method to create a filter to filter out the files to be displayed.

For example this statement creates a filter with the name 'Word files' that will only include files with the extension .doc.

#saveFileDLG.AddFilter( 'Word files' '*.doc' )

The filter to be displayed when the dialog is shown is specified using the FilterIndex property.


HideReadOnly property

Use the HideReadOnly property to hide or show read-only files.

The value of this property can be True or False.


Name property

Use the Name property to specify the name of the filter.


Extension property

Use the Extension property to specify the file extension of the files to be shown.


Calendar for field visualization


Calendar for field visualization Calendar primitive


Help handler interface

Help handler interface

Methods

ProcessFocusControl method

ProcessHelpRequest method

Parameters

Handled parameter

Requestor parameter

Tag parameter

Handled parameter

Requestor parameter

Property

Tag property


ProcessFocusControl method

Internal use only.


ProcessHelpRequest method

Use the ProcessHelpRequest method to do processing when the user presses F1.

For more information and an example of the ProcessHelpRequest, refer to iHelpHandler Interface in the Developer Guide.


Handled parameter

Internal use only.


Requestor parameter

Internal use only.


Tag parameter

For LANSA internal use only.


Handled parameter

The Handled parameter can be True or False to indicate whether the help request has been handled.

If the Handled parameter is False and no other processing is specified, LANSA shows the repository help.


Requestor parameter

The Requestor parameter is the component requesting the help.


Tag property

For LANSA Product Centre's internal use only.


Tabsheet

Tabsheet Properties

Tabsheet Events

Tabsheet Methods


Tabsheet Properties

DockAllowedPositions property

DockAllowUndock property

DockCloseButton property

DockPosition property


DockAllowedPositions property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the DockAllowedPositions property to specify which part of the screen the tab sheet can be attached to (docked).

The values are Left, Right, Top, Bottom and None. All positions can be selected. None overrides the multi-select options and specifies that the TabSheet cannot be docked anywhere.

Note that this property applies to user interaction only and has no bearing on programmatic changes. Therefore a TabSheet with DockPosition(Left) and DockAllowedPositions(None) will appear as a DockLeft TabSheet.


DockAllowUndock property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the DockAllowUndock property to specify if the tab sheet can be moved away (undocked) from the tab folder.

This property can be set to True or False.

When this property is True, a docking bar (a double line) is displayed on the tab sheet. To undock the tab sheet, the user drags from the docking bar.

Copy and paste this code to see the effect of the DockAllowUndock method:

Function Options(*DIRECT)

BEGIN_COM ROLE(*EXTENDS #PRIM_FORM) CAPTION('Docking Framework Sample') CLIENTHEIGHT(378) CLIENTWIDTH(549) HEIGHT(405) LAYOUTMANAGER(#ATLM_1) LEFT(418) TOP(163) WIDTH(557)
DEFINE_COM CLASS(#PRIM_TAB) NAME(#TAB_1) DISPLAYPOSITION(1) HEIGHT(378) LEFT(0) LEFTTABWIDTH(154) PARENT(#COM_OWNER) TABPOSITION(1) TABSTOP(False) TOP(0) VISUALSTYLE(#VS_TAB) WIDTH(549)
DEFINE_COM CLASS(#PRIM_ATLM) NAME(#ATLM_1)
DEFINE_COM CLASS(#PRIM_ATLI) NAME(#ATLI_1) ATTACHMENT(Center) MANAGE(#TAB_1) PARENT(#ATLM_1)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_1) CAPTION('Page1') DISPLAYPOSITION(1) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(146)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_2) CAPTION('Page2') DISPLAYPOSITION(2) DOCKCLOSEBUTTON(True) DOCKPOSITION(Left) HEIGHT(349) LEFT(4) OPENED(True) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(146)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_3) CAPTION('Page3') DISPLAYPOSITION(1) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(3) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_4) CAPTION('Page4') DISPLAYPOSITION(2) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(2) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_TBSH) NAME(#TBSH_5) CAPTION('Page5') DISPLAYPOSITION(3) HEIGHT(349) LEFT(4) PARENT(#TAB_1) TABPOSITION(1) TABSTOP(False) TOP(25) WIDTH(382)
DEFINE_COM CLASS(#PRIM_PHBN) NAME(#PHBN_1) CAPTION('Make Page 1 and Page 2 Dockable') DISPLAYPOSITION(1) LEFT(32) PARENT(#TBSH_3) TABPOSITION(1) TOP(171) WIDTH(321)
EVTROUTINE HANDLING(#PHBN_1.Click)
set com(#tbsh_1 #tbsh_2) dockallowundock(True)
ENDROUTINE
End_Com


DockCloseButton property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the DockCloseButton property to specify whether a Close button is displayed in the tab sheet. When a tab sheet has a Close button it can be closed.

This property can be set to True or False.


DockPosition property

A tab framework property. Refer to Tab folder for an example of a tab framework application.

Use the DockPosition property to specify where the tab sheet is attached.

The tab sheet can be docked to the Center, Left, Right, Bottom or Top of the screen.

Using the DockPosition properties of tab sheets you can construct a tab framework application from a single tab folder.


Tabsheet Events

AutoHideClick event

CloseClick event

Docked event

Undocked event


AutoHideClick event

A tab framework property. Refer to Tab folder for an example of a tab framework application.

The AutoHideClick event is triggered when the Attach button on the tab sheet is clicked.

The Attach button is only displayed when the BottomAllowAutohide, LeftAllowAutohide, RightAllowAutohide or the TopAllowAutohide properties of the tab folder are set to True.


CloseClick event

A tab framework property. Refer to Tab folder for an example of a tab framework application.

The CloseClick event is triggered when the user clicks on the Close button on the tab sheet.

The Close button is displayed when the DockCloseButton property is True.


Docked event

A tab framework event. Refer to Tab folder for an example of a tab framework application.

The Docked event is triggered when the tab sheet is attached to a position (docked). This event is triggered when the user docks the tab sheet from an undocked position and also when the DockPosition of the tab sheet changes while staying docked (for example when DockPosition changes from Left to Right).


Undocked event

A tab framework event. Refer to Tab folder for an example of a tab framework application.

The Undocked event is triggered when the tab sheet is detached from a position (undocked).


Tabsheet Methods

HideSheet method

ShowSheet method


HideSheet method

A tab framework method. Refer to Tab folder for an example of a tab framework application.

Use the HideSheet method to hide a tab sheet. This is the programmatic equivalent of clicking the Close button.


ShowSheet method

A tab framework method. Refer to Tab folder for an example of a tab framework application.

Use the ShowSheet method to redisplay a tab sheet that has been hidden using the Close button.


Activate parameter

Use the activate parameter to specify whether the tab sheet which is redisplayed will be activated.

The value of this property can be True or False.


Ribbon Features


Ribbon

A ribbon is a command bar that organizes a program's features into a series of tabs or sheets at the top of a form. A ribbon combines the more traditional menu bar and toolbars into a single control concept.

Ribbon examples can be seen in the version 13 LANSA IDE and Microsoft Office 2007 and beyond.

Not all application environments are suited to a ribbon and you should consider carefully whether a ribbon is the best solution for your requirements.

Ribbons are always as wide as the component they are being used on and have a fixed height.


Minimized

True

The ribbon is shown minimized. Only the sheet captions will be visible

False

The entire ribbon is shown.


OpenPage

Reference to a ribbon sheet (#Prim_RBBN.Sheet)

Provides access to the active ribbon sheet.


QuickAccessToolbarOnTop

True

The Quick Access Toolbar is displayed above the ribbon. In forms with a glass appearance, the toolbar will appear in the titlebar area.

False

The Quick Access Toolbar will be displayed immediately below the ribbon.


Access Key

Access Keys define shortcut commands (F3, Ctrl+S etc.,) and KeyTips for mnemonic access to be attached to specific controls on the ribbon.


Control

Reference to an instance of a Control (#Prim_CTRL) to which the keytip and shortcut will apply.


Application Menu

Application menu (#Prim_RBBN.ApplicationMenu) is shown on the left hand side of the popup displayed when the blue application button is clicked.

There are no specific design rules and as a result the application menu is just a plain panel. How it behaves and what is shown is entirely down to the developer.

Define_Com Class(#Prim_rbbn) Name(#Ribbon) Displayposition(1) Height(140) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(1033)

Define_Com Class(#Prim_Rbbn.ApplicationMenu) Name(#ApplicationMenu) Caption('File') Displayposition(1) Height(80) Keytip('F') Left(30) Parent(#Ribbon) Tabposition(8) Top(0) Width(100)

Define_Com Class(#Prim_Rbbn.ApplicationMenuContent) Name(#ApplicationMenuContent) Displayposition(5) Height(80) Parent(#Ribbon) Tabposition(7) Top(0)

Define_Com Class(#Prim_Rbbn.ApplicationMenuFooter) Name(#ApplicationMenuFooter) Displayposition(4) Height(20) Left(30) Parent(#Ribbon) Tabposition(6) Top(0)


Caption

The Application Menu Caption will be shown in the blue application menu button, typically the "File" item.

As ribbon keyboard navigation is achieved through the use of AccessKeys (#Prim_RBBN.AccessKey) and KeyTips, there is no need to embed an & in the text.


Application Menu Content

Application menu content (#Prim_RBBN.ApplicationMenuContent) is shown on the right hand side of the popup displayed when the blue application button is clicked.

As the content may change entirely depending on what is active on the application content page it may be necessary to make many different content instances. As with the Application Menu itself, Content is a plain panel and the design and behaviour is ultimately down to the developer.

Define_Com Class(#Prim_rbbn) Name(#Ribbon) Displayposition(1) Height(140) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(1033)

Define_Com Class(#Prim_Rbbn.ApplicationMenu) Name(#ApplicationMenu) Caption('File') Displayposition(1) Height(80) Keytip('F') Left(30) Parent(#Ribbon) Tabposition(8) Top(0) Width(100)

Define_Com Class(#Prim_Rbbn.ApplicationMenuContent) Name(#ApplicationMenuContent) Displayposition(5) Height(80) Parent(#Ribbon) Tabposition(7) Top(0)

Define_Com Class(#Prim_Rbbn.ApplicationMenuFooter) Name(#ApplicationMenuFooter) Displayposition(4) Height(20) Left(30) Parent(#Ribbon) Tabposition(6) Top(0)


Application Menu Footer

The Application menu footer (#Prim_RBBN.ApplicationMenuFooter) is shown at the bottom of the popup displayed when the blue application button is clicked.

As with the Application Menu and Content, the Footer is a plain panel and the design and behaviour is ultimately down to the developer.

Define_Com Class(#Prim_rbbn) Name(#Ribbon) Displayposition(1) Height(140) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(1033)

Define_Com Class(#Prim_Rbbn.ApplicationMenu) Name(#ApplicationMenu) Caption('File') Displayposition(1) Height(80) Keytip('F') Left(30) Parent(#Ribbon) Tabposition(8) Top(0) Width(100)

Define_Com Class(#Prim_Rbbn.ApplicationMenuContent) Name(#ApplicationMenuContent) Displayposition(5) Height(80) Parent(#Ribbon) Tabposition(7) Top(0)

Define_Com Class(#Prim_Rbbn.ApplicationMenuFooter) Name(#ApplicationMenuFooter) Displayposition(4) Height(20) Left(30) Parent(#Ribbon) Tabposition(6) Top(0)


Contextual Group

A Contextual Group can be used to collect sheets (#Prim_RBBN.Sheet) that belong to a similar group, or simply to display further information about a sheet in the title bar.

Microsoft Word uses contextual groups for features such as Tables. When a table is selected in the document an additional pair of ribbon sheets is shown.

Define_Com Class(#Prim_rbbn.ContextualGroup) Name(#ContextualGroup) Caption('Contextual Group') Parent(#Ribbon)

Define_Com Class(#Prim_rbbn.Sheet) Name(#Sheet1) Caption('Sheet1') Contextualgroup(#ContextualGroup) Displayposition(1) Height(91) Left(0) Parent(#Ribbon) Tabposition(3) Top(49) Width(1033)

Define_Com Class(#Prim_rbbn.Sheet) Name(#Sheet2) Caption('Sheet2') Contextualgroup(#ContextualGroup) Displayposition(2) Height(91) Left(0) Parent(#Ribbon) Tabposition(4) Top(49) Width(1033)


Caption

Text that will be displayed as a heading above the sheets that comprise the contextual group.


Visible

The visible property overrides the visible state for all sheets that are part of the group.

True

All sheets that are part of this contextual group will be visible, unless the sheet is Visible(False)

False

All sheets that are part of this contextual group will be hidden regardless.


Ribbon Group

A Group is a subset of a sheet. Most sheets will have several different groups that organize the commands on the ribbon into related subjects.

Controls can only be shown on a ribbon if they area parented to a Group

As with all parts of a ribbon, each group is a plain panel. Design is down the developer.

Define_Com Class(#Prim_rbbn) Name(#Ribbon) Displayposition(1) Height(140) Left(8) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(1033)
Define_Com Class(#Prim_rbbn.Sheet) Name(#Sheet1) Caption('Sheet1') Displayposition(2) Height(91) Left(0) Parent(#Ribbon) Tabposition(1) Top(49) Width(1033)
Define_Com Class(#Prim_rbbn.Group) Name(#Sheet1Group1) Caption('Clipboard') Dialogbutton(True) Displayposition(1) Height(91) Left(12) Parent(#Sheet1) Tabposition(1) Top(0) Width(100)
Define_Com Class(#Prim_rbbn.Group) Name(#Sheet1Group2) Caption('Styles') Displayposition(2) Height(91) Left(124) Parent(#Sheet1) Tabposition(2) Top(0) Width(100)
Define_Com Class(#Prim_rbbn.Group) Name(#Sheet1Group3) Caption('Editing') Displayposition(3) Height(91) Left(236) Parent(#Sheet1) Tabposition(3) Top(0) Width(100)


DialogButton Click Event

Fired when the group Dialog Button is clicked.


DialogButton Property

True

Show the dialog button in the bottom right hard corner of the group

False

Hide the dialog button


Help Toolbar

The ribbon help toolbar is show in the top right hand corner of the ribbon.

As with all parts of a ribbon, the Help Toolbar is a plain panel. Design is down the developer.


Image Property

Reference to a base LANSA graphic (#Prim_FLBX)

Denotes the 32x32 image to be displayed when the group is collapsed.


Quick Access Toolbar

The Quick Access Toolbar is shown on the ribbon on the left hand side. It typically displays a lines of small images used for commonly used commands such as Save. Whether it is shown above or below the Ribbon is governed by the Ribbon QuickAccessToolbarOnTop property.

As with all parts of a ribbon, the Quick Access Toolbar is a plain panel. Design is down the developer.


Ribbon Sheet

A Ribbon sheet is a container for Ribbon Groups (#Prim_RBBN.Group). Sheets define the tabbed pages that comprise the ribbon.


KeyTip

KeyTip is the string used to access a particular command on the ribbon when using the keyboard.

A Keytip is usually single character, typically the initial letter, but for more complex ribbons it may be preferable to use two characters.


Contextual Group

Reference to the Context Group (#Prim_RBBN.ContextualGroup).

Used to collect sheets in to set that can be displayed when the Context Group is made visible.


Glass Controls


Glass Property

Reference to an instance of a Glass (#Prim_FORM.Glass)

By setting a Form to be glass, the title bar and all borders are removed and the background of the form becomes translucent.


Form Glass

By setting a Form to be glass, the title bar and all borders are removed and the background of the form becomes translucent.

A normal form has defined areas for the title bar and borders and a 100% opaque background. The first accessible pixel for the content, Left(0) Top(0), is below the title bar and to the right of the left hand border.

By giving a form an instance of a Glass, the title bar and borders of the form become available to the developer and 0,0 moves to the upper left hand corner of the form. In effect, there are no borders or title bar and the developer has access to every pixel.

Under the covers, glass is a frame style that is applied to the form. This means that it's possible to change the form to use glass but with a FrameStyle property of None. This results in an entirely invisible form with only the child controls being visible.


Glass Style Property

Glass Style has two possible values

All

The whole form will be glass, regardless of the values specified for the margins

Partial

Only the area outside the margins as specified will be shown as glass. This allows for the title bar area to be glass but the remainder of the form to behave as normal.


MarginBottom Property

In conjunction with the MarginTop, MarginLeft and MarginRight properties, describes the area of the form to be given a glass appearance.

The area outside the rectangle described by the properties will be glass. The area inside will be black and 100% opaque.


MarginLeft Property

In conjunction with the MarginTop, MarginBottom and MarginRight properties, describes the area of the form to be given a glass appearance.

The area outside the rectangle described by the properties will be glass. The area inside will be black and 100% opaque.


MarginRight Property

In conjunction with the MarginTop, MarginLeft and MarginRight properties, describes the area of the form to be given a glass appearance.

The area outside the rectangle described by the properties will be glass. The area inside will be black and 100% opaque.


MarginTop Property

In conjunction with the MarginTop, MarginLeft and MarginRight properties, describes the area of the form to be given a glass appearance.

The area outside the rectangle described by the properties will be glass. The area inside will be black and 100% opaque.


ShowInTaskBar Property

In conjunction with the FormStyle property, ShowInTaskBar determines whether the form will appears as an item in the Windows TaskBar.

There are 3 possible values

FormStyle

This is the default and defers behaviour as determined by the Formstyle property.

Yes

Show this form in the Windows TaskBar

No

Do not show this form in the Windows TaskBar.

This is useful when creating splash screens.


TaskBar Property

Reference to an instance of a TaskBar (#Prim_FORM.TaskBar)

By creating a TaskBar instance, it is possible for the form to interact with the item shown in the Windows Taskbar.

Begin_Com Role(*EXTENDS #PRIM_FORM) Taskbar(#Taskbar)

Define_Com Class(#Prim_Form.Taskbar) Name(#Taskbar) Hint('My Application Hint')


TaskBar

By creating a TaskBar instance, it is possible for the form to interact with the item shown in the Windows Taskbar.

Begin_Com Role(*EXTENDS #PRIM_FORM) Taskbar(#Taskbar)

Define_Com Class(#Prim_Form.Taskbar) Name(#Taskbar) Hint('My Application Hint')

The Windows task bar can be used to provide additional runtime feedback about the behavior of an application. It can behave like a progress bar and can augment the application icon with overlaid images to indicate the state of the application. This can be particularly useful when the application is minimized or hidden behind other applications.


Hint Property

Text for the hint that is shown on mouse over the task bar item.


OverlayImage Property

Reference to a base graphic (#Prim_Flbx) which can be any LANSA bitmap (Prim_BMP) or Icon (#Prim_ICON)

The image specified will be positioned on the Taskbar item, overlaying the application icon, in the bottom right hand corner. Regardless of the size of the image supplied, the image will be displayed as 16 x 16.


ProgressStyle Property

In conjunction with the ProgressValue property, determines the behaviour of the Taskbar item when being used to indicate application progress.

ProgressStyle has 5 possible values

Error

The Taskbar item is shown in red to indicate that the application has an error. The value of the PercentageValue property will still be shown.

Indeterminate

The Taskbar item animates with a repeating pattern.

This can be used when executing a long running process where the end time is unknown.

None

No progress state is displayed and the Taskbar Item will appear as normal.

Normal

The Taskbar Item will behave like a progress bar and will represent the value of the ProgressValue property.

Paused

The Taskbar item is shown in yellow to indicate that the application is paused. The value of the PercentageValue property will still be shown.


Progress Value

In conjunction with the ProgressStyle property, determines the behaviour of the Taskbar item when being used to indicate application progress.

ProgressValue is a percentage and can be used to display values from 0 to 100.


Animation

Animations allow Visual LANSA controls to move, change opacity, change size etc.

An Animation (#Prim_ANIM) is used as a container for all individual animation activities. It can contain many different parts and can animate many different controls simultaneously. The sample below rotates a button clockwise. At the same time, a second button is rotated anticlockwise while its height is also changed.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Rotate) Name(#Rotate1) Angle(180) Manage(#Button) Parent(#Animation)

Define_Com Class(#prim_anim.Rotate) Name(#Rotate2) Angle(-180) Manage(#Button2) Parent(#Animation)

Define_Com Class(#prim_anim.Rotate) Name(#Height) Height(50) Manage(#Button2) Parent(#Animation)

They are executed in a separate thread and this makes them perfect for splash screens and busy processing as other processing can continue unaffected. Once an animation begins, it cannot be modified during its execution.

Animations are visual effects and do not modify the state of a component until the animation is complete.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Rotate) Name(#Rotate) Angle(180) Duration(5000) Manage(#Button) Parent(#Animation)

In the animation above, a button is rotated 180 degrees and will take 5 seconds to complete. While the button is still active during the animation and can still be clicked, its Rotation property will be the original value until the animation completes. Animations cannot put a control in to a state that cannot be mirrored by setting specific properties on the control.

Animations are not affected by layout managers. Any controls subject to layout management will appear as normal prior to the start of the animation. When the animation starts, they will follow the instructions of the animation and as soon as it ends they will revert to following the rules of the layout. However, for simplicity, animations are best used in environments where layout managers are not be used.

Commonly used animations are available as features of all Visual LANSA controls e.g. Fade.


Ended

The ended event is fired when the animation completes.


Starting

The starting event is fired just before the animation starts


Start

The Start method starts or restarts the Animation.

As Animations cannot be changed once started, executing the Start method while an animation is executing will reset the animation and it will begin again.

Use the IsAnimating property to determine whether an animation is already in progress.


Stop

The Stop method stops an animation and returns all controls to their state prior to the commencement of the animation.


IsAnimating

Determines whether the animation is running executing.

IsAnimating is useful for scenarios where the same animation is being used repeatedly to prevent a subsequent execution interrupting the current execution.

Evtroutine Handling(#Button.Click)

If (*Not #Animation.isAnimating)

#Animation.Start

Endif

Endroutine

True

The animation is currently in progress.

False

The animation is currently stopped.


Animation Item

Base class for all individual animations.


Duration

Number of milliseconds taken to complete the animation.

The default is 1000.


StartTime

Number of milliseconds to wait starting the animation.

As each part of the animation is executed independently, it is down to the user to organize when each part begins.


Height Animation

A Height animation (#Prim_Anim.Height) animates a change of height from the current height of the managed control to the height specified in the Height property.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Height) Name(#Step1) Height(100) Manage(#Button) Parent(#Animation)


Height

Height of the managed control when the animation completes.


Manage

Reference to a Control (#Prim_CTL) that the animation will affect.


Move Animation

A Move animation (#Prim_Anim.Move) animates a move of the managed control the number of pixels specified in the Left and Top properties.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Move) Name(#Step1) Left(100) Manage(#Button) Parent(#Animation) Top(-50)


Left

Number of pixels to add to the control's Left property.

A positive number will increment the Left property, moving the control to the right.


Top

Number of pixels to add to the control's Top property.

A positive number will increment the Top property, moving the control down.


MoveFrom Animation

A MoveFrom animation (#Prim_Anim.MoveFrom) animates a move of the managed control from the position specified in the Left and Top properties to the current location of the control.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.MoveFrom) Name(#Step1) Left(100) Manage(#Button) Parent(#Animation) Top(100)


Left

In conjunction with Top property, defines the location where the animation will begin.


Top

In conjunction with Left property, defines the location where the animation will begin.


MoveTo Animation

A MoveTo animation (#Prim_Anim.MoveTo) animates a move of the managed control to the position specified in the Left and Top properties from the current location of the control.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.MoveTo) Name(#Step1) Left(100) Manage(#Button) Parent(#Animation) Top(100)


Left

In conjunction with Top property, defines the location where the animation will end.


Top

In conjunction with Left property, defines the location where the animation will end.


Opacity Animation

An Opacity animation (#Prim_Anim.Opacity) animates a change of opacity from the control's current opacity to the values specified in the opacity property.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Opacity) Name(#Step1) Manage(#Button) Opacity(0) Parent(#Animation)


Opacity

Opacity of the managed control when the animation completes.


Rotate Animation

A Rotate animation (#Prim_Anim.Rotate) animates a change of rotation from the control's current rotation to the values specified in the Angle property.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Rotate) Angle(360) Name(#Step1) Manage(#Button) Parent(#Animation)


Angle

Number of degrees to rotate the control.

A positive number will rotate the control clockwise, a negative number anticlockwise.


OriginLeft

In conjunction with the OriginTop property, determines the point about which the control will rotate.

OriginLeft is a percentage.


OriginTop

In conjunction with the OriginLeft property, determines the point about which the control will rotate.

OriginTop is a percentage.


Scale Animation

A Scale animation (#Prim_Anim.Scale) animates a change of scale from the control's current scale to the values specified in the ScaleHeight and ScaleWidth properties.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Scale) Name(#Step1) Manage(#Button) Parent(#Animation) ScaleHeight(125) Scalewidth(125)


Origin Left

In conjunction with the OriginTop property, determines the point from which the control will scale.

OriginLeft is a percentage.


Origin Top

In conjunction with the OriginLeft property, determines the point from which the control will scale.

OriginTop is a percentage.


ScaleHeight Left

ScaleHeight of the managed control when the animation completes.

ScaleHeight is a percentage


ScaleWidth Left

ScaleWidth of the managed control when the animation completes.

ScaleWidth is a percentage.


Skew Animation

A Skew animation (#Prim_Anim.Skew) animates a change of skew from the control's current skew to the values specified in the AngleLeft and AngleTop properties.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Skew) AngleLeft(45) AngleTop(45) Name(#Step1) Manage(#Button) Parent(#Animation)


Angle Left

Defines the number of degrees of horizontal skew to be applied to the managed control.


Angle Top

Defines the number of degrees of vertical skew to be applied to the managed control.


Origin Left

In conjunction with the OriginTop property, determines the point about which the control will skew.

OriginLeft is a percentage.


Origin Top

In conjunction with the OriginLeft property, determines the point about which the control will skew.

OriginLeft is a percentage.


Visibility Animation

A Visibility animation (#Prim_Anim.Visibility) animates a change to the managed control's visible property.

Similar to the Opacity animation, the control will fade in or out during the animation.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Visibility) Name(#Step1) Manage(#Button) Parent(#Animation)


Visible

True

The control will be visible true and have an opacity of 100

False

The control will be visible false and have an opacity of 0


Width Animation

A Width animation (#Prim_Anim.Width) animates a change of width from the current width of the managed control to the width specified in the width property.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Width) Name(#Step1) Manage(#Button) Parent(#Animation) Width(100)


Width

Width of the managed control when the animation completes.


Transition Animation

Transition animates the change from one control to another as specified in the From and To parameters. It is typically used in application where different panels are activated when items in a list are selected.

Transition works by taking images of the two controls and blending them during the animation. For best results the two controls should occupy the same physical bounds.

At the end of the animation the From control will be visible false and the To control will be visible true.

Define_Com Class(#prim_anim) Name(#Animation)

Define_Com Class(#prim_anim.Transition) Name(#Step1) Duration(2000) From(#Panel1) Parent(#Animation) To(#Panel2) Transitiontype(Wave)


From

Reference to a Control (#Prim_CTRL)

From specifies the control that will be visible false when the animation completes.


To

Reference to a Control (#Prim_CTRL)

To specifies the control that will be visible true when the animation completes.


TransitionType

There are a number of different types of transition available.

The default is Fade


Control and Composite


Origin

The variables specified in the Origin selector will contain a reference the control on which the event was first fired.


Handled

The Handled selector allows a user to stop routed events going any further along the parent chain. The default is false

True

The event is being processed in this event routine and should not be routed to the parent.

False

The event is not being fully processed in this event routine and should be routed to the parent.


FadeIn Method

DirectX Only

FadeIn is an animation method that transitions a control's Opacity property from its current value to 100 over the specified duration. When the animation completes the Visible property will be True.

Like all animations, it is executed in a separate thread allowing other processing to continue.


Delay

Number of milliseconds to delay the processing of the animation. The default is 0.


Duration

Number of milliseconds required to complete the animation. Default is 250.


FadeOut Method

DirectX Only

FadeOut is an animation method that transitions a control's Opacity property from its current value to 0 over the specified duration. When the animation completes the Visible property will be False.

Like all animations, it is executed in a separate thread allowing other processing to continue.


Scale Method

DirectX Only

Scale is an animation method that transitions a control's ScaleWidth and ScaleHeight properties from their current value to the specified value over the specified duration. When the animation completes the control's ScaleHeight and ScaleWidth properties will match the specified values.

Like all animations, it is executed in a separate thread allowing other processing to continue.


ScaleWidth

Target ScaleWidth value for the animation. Default is 100.


ScaleHeight

Target ScaleHeight value for the animation. Default is 100.


MouseEnter Event

DirectX Only

MouseEnter is fired when the mouse enters the outer bounds of a control.


MouseHover Event

DirectX Only

MouseHover is fired when the mouse is stationary over a control for a predetermined amount of time. The event is fired once and will only fire again when the mouse has left the re-entered the control.


MouseLeave Event

DirectX Only

MouseLeave is fired when the mouse leaves the outer bounds of a control. It is not fired on the parent when the mouse enters the bounds of a child control.


Hint Popup Property

DirectX Only

Hint Popup allows a PopupPanel (#prim_ppnl) instance to be used instead of the default popup text box. This gives the developer complete control over the content and format of the hint.

Define_Com Class(#prim_phbn) Name(#Button) Caption('Click') Hintpopup(#ButtonHintPanel)

Define_Com Class(#Prim_ppnl) Name(#ButtonHintPanel) Content(#MyHintPanelContent)


Hint Title Property

DirectX Only

When specified, the HintTitle is shown at the top of the hint window in emphasized text. The remainder fof the hint is shown below as normal.


IsAnimating Property

DirectX Only

Used to determine whether a control is being animated.

Typically used to prevent an animation being restarted.

True

The control is not being animated

False

The control is being animated


MouseOver Property

DirectX Only

Determines whether the mouse is directly over a control. If the mouse is over a child control, MouseOver will be false.

MouseOver is useful when MouseEnter/Leave code is being run to change the appearance of a control, but other factors are also affecting the control's state.

True

The mouse is directly over the control

False

The mouse is not directly over the control


MouseOverStyle Property

DirectX Only

Denotes the Style (#Prim_vs.Style) to be applied to a control in the event of the Mouse entering the physical bounds of the control. The style is removed when the mouse leaves the control.

MouseOverStyle negates the need to code many MouseEnter and corresponding MouseLeave events and allows for simple declaration instead.


MouseOverStyles Property

DirectX Only

Collection of Styles (#Prim_vs.Style) to be applied to a control in the event of the Mouse entering the physical bounds of the control. The styles are removed when the mouse leaves the control.

MouseOverStyles allows for more complex programmatic appearance changes to be coded. Rather than relying on the declarative single MouseOverStyle, the developer is free to add as many style layers as required.


Opacity Property

DirectX Only

Opacity denotes the appearance of a control in terms of its interaction with its background.

The default is 100; entirely opaque. No background will be visible at all.

As the value decreases, more and more of the background will become visible through the control. When the value is 0 the control will be entirely transparent and only the background will be visible.

Note: a control with opacity of 0 is not visible to the user but will continue to function as normal and is still both visible and enabled.


Popup Property

DirectX Only

Popup allows a PopupPanel (#prim_ppnl) instance to be used instead of the typical right click popup menu (Prim_pmnu). This gives the developer complete control over the content and format of the popup.

Define_Com Class(#prim_trvw) Name(#Tree) Popup(#TreePopupPanel)

Define_Com Class(#Prim_ppnl) Name(#TreePopupPanel) Content(#MyTreePopupPanel)


Rotation Property

DirectX Only

Rotation allows a control to rotate about a given origin as specified by the RotationOriginLeft and RotationOriginTop properties.

Rotation is a measured in degrees and has a range of values from 0 to 359.

Rotation, like Scale and Skew, is a visual effect and does not alter the fundamental size and position of the control. The left, top, height and width properties maintain their value. Rotated controls are clipped to ensure they fit within the bounds of their parent control.


RotationOriginLeft Property

DirectX Only

In conjunction with RotationOriginTop, defines the coordinates of an imaginary point about which a control will rotate when the Rotation property is applied.

RotationOriginLeft is a percentage and has a default of 50.


RotationOriginTop Property

DirectX Only

In conjunction with RotationOriginTop, defines the coordinates of an imaginary point about which a control will rotate when the Rotation property is applied.

RotationOriginTop is a percentage and has a default of 50.


ScaleHeight Property

DirectX Only

In conjunction with ScaleWidth, defines the visible size of the control based on an imaginary point defined by the ScaleOriginLeft and ScaleOriginTop properties.

ScaleHeight is a percentage. The default is 100.

Scale, like Rotation and Skew, is a visual effect and does not alter the fundamental size and position of the control. The left, top, height and width properties maintain their value. Scaled controls are clipped to ensure they fit within the bounds of their parent control.


ScaleWidth Property

DirectX Only

In conjunction with ScaleHeight, defines the visible size of the control based on an imaginary point defined by the ScaleOriginLeft and ScaleOriginTop properties.

ScaleWidth is a percentage. The default is 100.

Scale, like Rotation and Skew, is a visual effect and does not alter the fundamental size and position of the control. The left, top, height and width properties maintain their value. Scaled controls are clipped to ensure they fit within the bounds of their parent control.


ScaleOriginLeft Property

DirectX Only

In conjunction with ScaleOriginTop, defines the coordinates of an imaginary point from which a control will scale when the ScaleWidth and ScaleHeight properties are applied.

ScaleOriginLeft is a percentage and has a default of 50.


ScaleOriginTop Property

DirectX Only

In conjunction with ScaleOriginLeft, defines the coordinates of an imaginary point from which a control will scale when the ScaleWidth and ScaleHeight properties are applied.

ScaleOriginLeft is a percentage and has a default of 50.


SkewLeft Property

DirectX Only

In conjunction with SkewTop, defines the appearance of the control as though rotated around an imaginary point defined by the SkewOriginLeft and SkewOriginTop properties.

SkewLeft is measured in degrees. The default is 0.

Skew, like Rotation and Scale, is a visual effect and does not alter the fundamental size and position of the control. The left, top, height and width properties maintain their value. Skewed controls are clipped to ensure they fit within the bounds of their parent control.


SkewTop Property

DirectX Only

In conjunction with SkewLeft, defines the appearance of the control as though rotated around an imaginary point defined by the SkewOriginLeft and SkewOriginTop properties.

SkewTop is measured in degrees. The default is 0.

Skew, like Rotation and Scale, is a visual effect and does not alter the fundamental size and position of the control. The left, top, height and width properties maintain their value. Skewed controls are clipped to ensure they fit within the bounds of their parent control.


SkewOriginLeft Property

DirectX Only

In conjunction with SkewOriginTop, defines an imaginary point about which a control can be skewed using the SkewLeft and SkewTop properties.

SkewOriginLeft is a percentage. The default is 50.


SkewOriginTop Property

DirectX Only

In conjunction with SkewOriginLeft, defines an imaginary point about which a control can be skewed using the SkewLeft and SkewTop properties.

SkewOriginTop is a percentage. The default is 50.


Style Property

DirectX Only

Denotes the Style (#Prim_vs.Style) to be applied to a control. When the Style property is set, all Styles previously applied to the control are removed.

Styles from parent controls will be inherited dependent on value of the VisualStyleOfParent property.


Styles Property

DirectX Only

Collection of Styles (#Prim_vs.Style) to be applied to a control.

Styles allows for more complex programmatic appearance changes to be coded. Rather than relying on the declarative single Style property, the developer is free to add as many Style layers as required.


Styles Collection

DirectX Only

Collection of Styles (#Prim_Vcol<#Prim_vs.Style>) to be applied to a control.

Styles collections allow for multiple styles to be added to or removed from a control at run time.


Style

Style (#Prim_VS.Style) reference to be added to the Styles collection.

If the Style being added to the collection is already in the collection, the Add request is ignored.


Add Method

Add a Style to the Styles collection

If the Style being added to the collection is already in the collection, the Add request is ignored.


Remove Method

Remove a Style from the Styles collection

If the Style to be remove from the collection is not in the collection, the Remove request is ignored.


RemoveAll Method

Remove all Styles from the Styles collection


MouseOverPart Property

DirectX Only

Determines whether the mouse is directly over a control or any child control. In effect, this determines whether the mouse is within the physical bounds of the control.

MouseOverPart is useful when MouseEnter/Leave code is being run to change the appearance of a control, but other factors are also affecting the control's state.

True

The mouse is directly over the control or one of its children

False

The mouse is not over the control or any of its children


PrivateStyle Property

DirectX Only

Denotes the Style (#Prim_vs.Style) to be applied to this control only.

Styles are normally inherited by child controls, depending on the VisualStyleOfParent property. PrivateStyle allows composite controls to have their own styles without affecting the appearance of child controls.

For example, a group box may need to have a bold text but normally, applying bold to a composite directly will cause the both the caption and contents to become bold. By specifying this as a Private Style the group box can step out of the style inheritance chain.


PrivateStyles Property

DirectX Only

Collection of Styles (#Prim_vs.Style) to be applied to this control only.

Styles are normally inherited by child controls, depending on the VisualStyleOfParent property. PrivateStyle allows composite controls to have their own styles without affecting the appearance of child controls.

Styles collections allow for multiple styles to be added to or removed from a control at run time.


Transition Method

DirectX Only

Transition is a method that animates the change from one component to another.

The controls specified in the To and From parameters are switched from Visible(True) to Visible(False) respectively. The style of animation is dependent on the TransitionType property

For the best results, the two controls should occupy the same physical bounds.

Like all animations, it is executed in a separate thread allowing other processing to continue.

If the animation is still running when the method is called again, the animation will reset and begin again.


To

Reference to a Control (#Prim_Ctrl).

The control must be parented to the composite. When the animation complete the control will be Visible(True)


From

Reference to a Control (#Prim_Ctrl).

The control must be parented to the composite. When the animation completes the control will be Visible(False)


TransitionType

There are a number of transition types. The default is fade.


RenderStyle

In conjunction with the RNDR X_RUN argument, the RenderStyle properties of Form (#Prim_FORM) and Panel (#Prim_PANL) determine how some or all of the application is rendered.

The RNDR runtime argument has 3 possible values: W, M and X. Win32, Win32 and DirectX, and DirectX. For any of the application to render in DirectX, the runtime argument must be either M or X.

If the value is W, DirectX will not be used regardless of the value of the properties specified.

Form (#Prim_Form) has 3 possible values:

Application
The RNDR runtime argument value will be used. This is the default.

DirectX
The form will use DirectX if the RNDR runtime argument is either M or X.

Win32
The form will be Win32 regardless of the runtime setting.

Panel (#Prim_Panl) has 2 possible values:

Note that there is no option for a panel to specifically be Win32. Once a panel is DirectX, all child panels must be DirectX.

DirectX
The panel will use DirectX if the RNDR runtime argument is either M or X.

Parent
The panel will render dependent on its parent's RenderStyle. This is the default.

The defaults of Application for Form and Parent for panels allows DirectX to be implemented throughout the application with a change to a single runtime setting.

If you only want to enable DirectX in a piecemeal fashion, perhaps for a few panels so that you can incorporate new DirectX controls and styles, change the runtime setting to M so that DirectX is allowed and then change the forms or panels to be DirectX as required.


Style (Prim_Vs.Style)

Styles are used to change the appearance of a control. They allow you to define the color of text, background colors, fonts, borders and other visual features.

Unlike Visual Styles, which are mutually exclusive, multiple Styles can be added to a control affecting only the features specified on the style. If the same feature of a style is applied using two different style instances, the last one to be applied will take precedence.

Only foreground features are adopted by child controls e.g. Facename and TextColor.


BackgroundBrush Property

DirectX Only

Reference to an instance of a Brush (#Prim_vs.Brush) applied to the background of the control.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.

If both a BackgroundBrush and NormBackColor are specified, the BackgroundBrush will take precedence.

The BackgroundBrush property can be used as shown in the following Example.

Define_Com Class(#PRIM_VS.Style) Name(#BackGround) Backgroundbrush(#Backgroundbrush)

Define_Com Class(#PRIM_VS.LinearBrush) Name(#Backgroundbrush) Colors(#BackgroundbrushColors)

Define_Com Class(#Prim_Vs.BrushColors) Name(#BackgroundbrushColors)

Define_Com Class(#PRIM_VS.BrushColor) Name(#BackgroundbrushColor1) Color(Silver) Parent(#BackgroundbrushColors)

Define_Com Class(#PRIM_VS.BrushColor) Name(#BackgroundbrushColor1) At(100) Color(White) Parent(#BackgroundbrushColors)


BorderBottom Property

DirectX Only

In conjunction with BorderTop, BorderLeft and BorderRight, BorderBottom defines the thickness of the border displayed around a control.

Borders consume part of the control when applied. This is particularly relevant when applying a style with top and left borders on MouseOver. The top and left borders will effectively cause the 0, 0 coordinates to move resulting in child control moving screen position.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


BorderBrush Property

DirectX Only

Reference to an instance of a Brush (#Prim_vs.Brush) applied to the border of the control.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


BorderLeft Property

DirectX Only

In conjunction with BorderTop, BorderBottom and BorderRight, BorderLeft defines the thickness of the border displayed around a control.

Borders consume part of the control when applied. This is particularly relevant when applying a style with top and left borders on MouseOver. The top and left borders will effectively cause the 0, 0 coordinates to move resulting in child control moving screen position.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


BorderRight Property

DirectX Only

In conjunction with BorderTop, BorderLeft and BorderBottom, BorderRight defines the thickness of the border displayed around a control.

Borders consume part of the control when applied. This is particularly relevant when applying a style with top and left borders on MouseOver. The top and left borders will effectively cause the 0, 0 coordinates to move resulting in child control moving screen position.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


BorderTop Property

DirectX Only

In conjunction with BorderBottom, BorderLeft and BorderRight, BorderTop defines the thickness of the border displayed around a control.

Borders consume part of the control when applied. This is particularly relevant when applying a style with top and left borders on MouseOver. The top and left borders will effectively cause the 0, 0 coordinates to move resulting in child control moving screen position.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


CornerBottomLeft Property

DirectX Only

In conjunction with CornerTopLeft, CornerTopRight, and CornerBottomRight, CornerBottomLeft defines the radius of the corners for a control. By default, all corners have a 0 radius and are right angles.

Unlike borders, which change the position of the 0,0 coordinate, corners are a visual effect. When applied, the background of the control is clipped and the control will appear rounded. However, foreground features are not clipped and text may extend in to corners.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


CornerBottomRight Property

DirectX Only

In conjunction with CornerTopLeft, CornerTopRight, and CornerBottomLeft, CornerBottomRight defines the radius of the corners for a control. By default, all corners have a 0 radius and are right angles.

Unlike borders, which change the position of the 0,0 coordinate, corners are a visual effect. When applied, the background of the control is clipped and the control will appear rounded. However, foreground features are not clipped and text may extend in to corners.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


CornerTopLeft Property

DirectX Only

In conjunction with CornerBottomLeft, CornerBottomRight and CornerTopRight, CornerTopLeft defines the radius of the corners for a control. By default, all corners have a 0 radius and are right angles.

Unlike borders, which change the position of the 0,0 coordinate, corners are a visual effect. When applied, the background of the control is clipped and the control will appear rounded. However, foreground features are not clipped and text may extend in to corners.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


CornerTopRight Property

DirectX Only

In conjunction with CornerBottomLeft, CornerBottomRight and CornerTopLeft, CornerTopRight defines the radius of the corners for a control. By default, all corners have a 0 radius and are right angles.

Unlike borders, which change the position of the 0,0 coordinate, corners are a visual effect. When applied, the background of the control is clipped and the control will appear rounded. However, foreground features are not clipped and text may extend in to corners.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


Effect Property

DirectX Only

Reference to an instance of an Effect (#PRIM_VS.Effect)

Effects are used to augment the features specified on the style with blurring or a drop shadow to help present a 3D effect.

Background features of a Style are not inherited by child controls. This ensures that a background applied to a form is not repeated verbatim on child controls.


ForegroundBrush Property

DirectX Only

Reference to an instance of a Brush (#Prim_vs.Brush) applied to the foreground of the control.

Foreground features of a Style are inherited by child controls. This ensures that a font applied by a style to a form will be used consistently across all child controls.

If both a ForegroundBrush and TextColor are specified, the ForegroundBrush will take precedence.


MaskBrush

Reference to an instance of a Brush (#Prim_vs.Brush) applied to a control to selectively apply transparency. This allows for controls, particularly images, to fade out and blend in to the background.

In the case of a linear brush with a gradient from any color to transparent, the control will be become increasingly transparent. If using a Visual Brush, transparency will be applied based on the transparency of the image used in the Visual Brush.


Brush

Base class for all Brush classes i.e. Solid, Linear, Radial, Image and Visual Brushes

Brushes are used by styles (#Prim_VS.Style) to define the foreground and background appearance.

See the individual Brush classes for more detail.


BrushColors

BrushColors is a collector of BrushColor (Prim_Vs.BrushColor) instances. This abstraction allows same set of colors to be used on multiple brushes.

BrushColors uses BrushColor instances to describe the transition from one color to another. Typically, this might be a simple gradient transition from silver at the top to white at the bottom, but the number of colors and the nature of the transition are dependent on the configuration of the specific class of brush being used and the definition of the color instances.

The sample below changes from blue at the start to red at the end. This is denoted by the use of "At(100)" on the second color (#Color2)

Define_Com Class(#Prim_Vs.BrushColors) Name(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color1) Color(0:0:255) Parent(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color2) At(100) Color(255:0:0) Parent(#Colors)

As the transition is uniform the blue channel is decremented from 255 to 0 while the red channel increases from 0 to 255. The result is that at the mid-point the color will be 128:0:128, which is purple.


BrushColor

Used to define a color as part of BrushColors (#Prim_VS.BrushColors) instance.


At Property

At determines the point on an imaginary line at which the gradient color will be shown as the color specified in the Color property.

At is a percentage.

Define_Com Class(#Prim_Vs.BrushColors) Name(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color1) Color(Silver) Parent(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color2) At(100) Color(White) Parent(#Colors)


Color Property

Denotes the color of the brush at the point determined by the At property.

Color can be any valid RGB value e.g. 255:0:0 for red, or any of a series of predefined named colors such as red, blue, yellow, or transparent.

When brush colors are being used for a MaskBrush, the color property is evaluated as either Transparent or Opaque, regardless of the color specified.

The sample below changes from White to Transparent. The result is that as the transition occurs, the background will become progressively more visible.

Define_Com Class(#Prim_Vs.BrushColors) Name(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color1) Color(White) Parent(#Colors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#Color2) At(100) Color(Transparent) Parent(#Colors)


Parent Property

Reference to a BrushColors (#Prim_Vs.BrushColors) used to collect individual color instances.


Gradient Brush

Brush used to define a gradient color using one or more colors.


Colors Property

Reference to a BrushColors (#Prim_VS.BrushColors) instance.

Defines the colors used in the brush.


Opacity Property

Opacity denotes the appearance of a gradient in terms of its interaction with its background.

The default is 100; entirely opaque. Nothing behind the gradient will be visible at all.

As the value decreases, more and more of the background will become visible through the control. When the value is 0 the control will be entirely transparent and only the background will be visible.

When specified on a control, opacity affects the whole of the control, both foreground and background. When specified on a brush, opacity can be used to target either the foreground or the background, allowing for a semi-transparent background, but still fully opaque text.


Spread Property

Used to define the appearance of the brush beyond the extent of the brush colors or the logical start and end of the specific brush.

Pad

Any space before the start or end of the brush colors will be filled with the colors specified as the first and last colors respectively.

Thus, in the example below, where red does not start until 20% of the was across the gradient, the first 20% will be colored red. Similarly, the 20% after blue will be colored blue.

Define_Com Class(#Prim_Vs.LinearBrush) Name(#LinearBrush) Colors(#LinearBrushColors)

Define_Com Class(#Prim_Vs.BrushColors) Name(#LinearBrushColors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#LinearBrushColor1) At(20) Color(Red) Parent(#LinearBrushColors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#LinearBrushColor2) At(80) Color(Blue) Parent(#LinearBrushColors)

Reflect

Any space before the start or end of the brush colors will be filled with a reflection of the brush.

Repeat

Any space before the start or end of the brush colors will be filled with a repeat of the brush.


Linear Brush

A Linear Brush is used to create a gradient color that transitions between the colors specified in the Colors (#Prim_vs.BrushColors) property.

Linear brush has start and end coordinates to create an imaginary line that defines the path the gradient will follow, allowing the gradient to be vertical, horizontal or on an angle.


EndLeft Property

Used in conjunction with the EndTop, StartLeft and StartTop properties to define the path and extent of the brush evaluation. EndLeft is a percentage.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(100) EndTop(100) will appear to travel diagonally from the top left to the bottom right.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(100) will appear to travel vertically from the top to the bottom.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(50) will appear to travel vertically from the top to half way down the control. The Spread property will determine appearance beyond the extent of the start and end coordinates.


EndTop Property

Used in conjunction with the EndLeft, StartLeft and StartTop properties to define the path and extent of the brush evaluation. EndLeft is a percentage.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(100) EndTop(100) will appear to travel diagonally from the top left to the bottom right.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(100) will appear to travel vertically from the top to the bottom.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(50) will appear to travel vertically from the top to half way down the control. The Spread property will determine appearance beyond the extent of the start and end coordinates.

This collection of properties define the line along which a gradient color will change. It has StartTop and StartLeft co-ordinates, and EndTop and EndLeft co-ordinates. A StartLeft and StartTop of 0 refer to the top left hand corner of an area, and EndTop and EndLeft of 100 refern to 100% across and down, thus to the bottom right corner of the area.


StartLeft Property

Used in conjunction with the EndTop, EndLeft and StartTop properties to define the path and extent of the brush evaluation. StartLeft is a percentage.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(100) EndTop(100) will appear to travel diagonally from the top left to the bottom right.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(100) will appear to travel vertically from the top to the bottom.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(50) will appear to travel vertically from the top to half way down the control. The Spread property will determine appearance beyond the extent of the start and end coordinates.


StartTop Property

Used in conjunction with the EndTop, EndLeft and StartLeft properties to define the path and extent of the brush evaluation. StartTop is a percentage.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(100) EndTop(100) will appear to travel diagonally from the top left to the bottom right.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(100) will appear to travel vertically from the top to the bottom.

A Brush defined as StartLeft(0) StartTop(0) EndLeft(0) EndTop(50) will appear to travel vertically from the top to half way down the control. The Spread property will determine appearance beyond the extent of the start and end coordinates.


Radial Brush

A Radial Brush is used to create a gradient color that transitions between the colors specified in the Colors (#Prim_vs.BrushColors) property.

Radial Brush has Origin, Center, and Radius coordinates. The brush radiates from the Center along the extent of the Radius similar to Linear Brush (#Prim_VS.Linear Brush) but instead producing a circular pattern.

By having the Origin and Center coordinates the same, the brush will always appear as though directly in front of the view. However, changing the value changes the shape and the brush appears skewed. A simple analogy is that of looking at the beam of a torch. A RadialBrush can be thought of as a 2D view of a 3D shape. The Origin is the position of the torch, Center is the middle of the light as it shines on somthing, and Radius describes the width. If there is sufficient difference between the origin and center, it is no longer possible to see the base, just a "triangular" side view of the beam of light.

The example below is a simple radial brush that changes from red at 0, to blue producing a red center and blue outer.

Define_Com Class(#Prim_Vs.RadialBrush) Name(#RadialBrush) Colors(#RadialBrushColors)

Define_Com Class(#Prim_Vs.BrushColors) Name(#RadialBrushColors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#RadialBrushColor1) Color(Red) Parent(#RadialBrushColors)

Define_Com Class(#Prim_Vs.BrushColor) Name(#RadialBrushColor2) At(100) Color(Blue) Parent(#RadialBrushColors)


CenterLeft Property

In conjunction with the CenterTop property defines the start point or middle of the base of the beam. The brush colors will emanate from this point.

CenterLeft is a percentage.

Both CenterLeft and CenterTop have a default of 50.


CenterTop Property

In conjunction with the CenterTop property defines the start point or middle of the base of the beam. The brush colors will emanate from this point.

CenterTop is a percentage.

Both CenterLeft and CenterTop have a default of 50.


OriginLeft Property

In conjunction with the OriginTop property defines the position of the source. As the Origin and Center diverge the shape of the brush will tend become less circular and more splayed.

OriginLeft is a percentage.

Both OriginLeft and OriginTop have a default of 50.


OriginTop Property

In conjunction with the OriginLeft property defines the position of the source. As the Origin and Center diverge the shape of the brush will tend become less circular and more splayed.

OriginTop is a percentage.

Both OriginLeft and OriginTop have a default of 50.


RadiusLeft Property

In conjunction with the RadiusTop property defines the extent of the brush.

Equal values for RadiusLeft and RadiusTop will ensure that the brush is round, center and origin values nothwithstanding. By using differing values, the brush will appear squashed.

RadiusLeft is a percentage.

Both RadiusLeft and RadiusTop have a default of 50.


RadiusTop Property

In conjunction with the RadiusLeft property defines the extent of the brush.

Equal values for RadiusLeft and RadiusTop will ensure that the brush is round, center and origin values nothwithstanding. By using differing values, the brush will appear squashed.

RadiusLeft is a percentage.

Both RadiusLeft and RadiusTop have a default of 50.


Solid Brush

A Solid Brush is effectively a Linear Brush (#Prim_VS.LinearBrush) with a single color. This avoids the need to create the colors (#Prim_VS.BrushColors) and color (#Prim_VS.BrushColor) and allows for a simple definition on one statement.


Color Property

Denotes the color of the brush.

Color can be any valid RGB value e.g. 255:0:0 for red, or any of a series of predefined named colors such as red, blue, yellow or transparent.


Image Brush

An Image Brush is used to apply an image to a control rather than colors.

A typical use for this would be as watermark or background image for an application.


Alignment Property

Alignment determines where the image is located when it does not fill the space available. Conversely, if the image is too large for the space, Alignment determines which portion of the image is visible.

Possible values are – TopLeft, TopCenter, TopRight, CenterLeft, Center, CenterRight, BottomLeft, BottomCenter & BottomRight


Height Property

Determines the height of the image in pixels or as a percentage dependent on the Units property. When tiled, this denotes the size of each tile.


Image Property

Reference to an instance of a basic LANSA graphic component (#PRIM_FLBX).

This can an enrolled bitmap (#Prim_Bmp) or icon (#Prim_Icon), or a bitmap that has been created at runtime.


Left Property

Specifies how far from the left hand edge of the control the image is shown, either as a specific number of pixels or as a percentage of the control's width as specified in the Units property.


Opacity Property

Opacity denotes the appearance of a gradient in terms of its interaction with its background.

The default is 100; entirely opaque. Nothing behind the image will be visible at all.

As the value decreases, more and more of the background will become visible through the control. When the value is 0 the control will be entirely transparent and only the background will be visible.

When specified on a control, opacity affects the whole of the control, both foreground and background. When specified on a brush, opacity can be used to target either the foreground or the background, allowing for a semi-transparent background, but still fully opaque text.


Sizing Property

Describes how the image is stretched or squashed to fit in to the available container, be it a control or a tiled portion. The default is None.

None

The image is not resized in any way

Best Fit

The image is resized to fit in the available space while still maintaining its aspect ratio.

Fit Both

The image is resized to precisely fit the horizontal and vertical space. The aspect ratio is not maintained. This may result in the image appearing stretched.

Cropped

The image is resized to fit the available space while still maintaining its aspect ratio. Once either the horizontal or vertical fits within the control, not further resizing is done. This may result in some of the image not being visible.


Tile Property

Describes how the image is repeated within the control.

The default is None. All other enumeration values will result in the image being repeated both vertically and horizontally.

None

The image is not tiled in any way

Tile

The image is image repeated both vertically and horizontally.

MirrorHorizontal

The image is tiled and reflected along the vertical axis.

MirrorVertical

The image is tiled and reflected along the horizontal axis.

MirrorBoth

The image is tiled and reflected along both the horizontal and vertical axes.


Top Property

Specifies how far from the upper edge of the control the image is shown, either as a specific number of pixels or as a percentage of the control's width as specified in the Units property.


Units Property

Denotes how the size and position of the image is measured. The default is Percentage

Percentage

All height, width, left and top values are measured as a percentage of the control.

Pixels

All height, width, left and top values are measured as a specific number of pixels.


Width Property

Determines the width of the image in pixels or as a percentage dependent on the Units property. When tiled, this denotes the size of each tile.


Visual Brush

An Image Brush is used to apply an image to a control rather than colors. However, unlike Image Brush, which uses a static image, Visual Brush uses another control.

A typical use for this would be as the image when dragging and dropping.


Control Property

Reference to an instance of a Control (#Prim_CTRL).

As the image seen is the actual control itself, the control must be realized.

The image is not a snapshot or copy of the source image, but rather a reference to it. This means that the image will respond to changes made to the control.


Effect

DirectX Only

Effects are used to augment the features specified on the style.

There are two types of effect: Blur (#Prim_VS.Blur) or DropShadow (#Prim_VS.DropShadow)


Blur Effect

The blur effect, as the name suggests, is used to blur a control.


KernelType Property

There are two types of blur.

Gaussian

This results in a smoother blur with a higher quality. However, this takes more processing to achieve.

Box

This results in simpler blur with a lower quality that takes less processing.


Radius Property

Determines the blurriness of the blur.


DropShadow Effect

Drop shadows can be used to make controls appear as though floating above their parent control. They can also be used to create a glow like effect, typically behind text, as seen in the title bar of an Aero theme Windows form.

Like scale and rotation, Dropshadow is a visual effect and does not alter the fundamental size of the control.

Controls with a DropShadow are clipped to ensure they fit within the bounds of their parent control.


BlurRadius Property

Denotes the amount of blur to be applied to the shadow.

The closer the value is to zero, the less blurred the shadow.


Color Property

Denotes the color of the drop shadow.

The default is silver.


Direction Property

In conjunction with the ShadowDepth property, denotes the position of the drop shadow in relation to the source control.

Dropshadow is measured in degrees.

A value of zero is equivalent to having the light source casting the shadow at 9 o'clock.


Opacity Property

Opacity denotes the appearance of a shadow in terms of its interaction with its background.

The default is 100; entirely opaque. Nothing behind the shadow will be visible at all.

As the value decreases, more and more of the background will become visible through the shadow. When the value is 0 the shadow will be entirely transparent and only the background will be visible.


ShadowDepth Property

In conjunction with the Direction property, denotes the position of the drop shadow in relation to the source control.

A value of zero result in the shadow being directly behind the control.


User Designed Controls


Tile (Prim_Tile)

DirectX Only

Tile is a member of a group of list related primitive controls referred to as User Designed Controls.

Tile organises individual design panels in to a grid that is the equivalent of a flow layout manager.

UDCs can be manipulated by the use of the typical LANSA list commands ADD_ENTRY, UPD_ENTRY etc. When entries are added to the list, an instance of the design is made, fields can be passed in, and a corresponding list item is made. UDCs control the position of the item within the list, manage selection, focus, expand/collapse etc., and communicate with the individual item designs through a series of predefined methods published on an interface specific to the type of UDC. For Prim_Tile this is #Prim_Tile.iTileDesign

All UDCs use a parameterized type to define the class of the design to be created each time an entry is added. This is specified on the DEFINE_COM as below

Define_Com Class(#Prim_Tile<#MyTileDesign>) Name(#Tile)

Because of the overhead of making a reusable part instance compared to a simple item for a tree view (#Prim_TRVW) or list view (#Prim_LTVW), UDCs are not designed to be used with many thousand items. For high volume scenarios, other techniques are recommended.


Items Property

Collection of all the items currently in the Tile.


SelectionStyle Property

Defines whether Tile allows one or more than one item to be selected.

Single

Only one item can be selected.

Mulitple

Multiple items can be selected.


Tile Event Item

DirectX Only

Reference to an instance of a Tile Item (#Prim_Tile.iTileItem).

The item supplied on the event is a reference to the item currently being processed.


Add Method

Rather than using the typical LANSA list commands, the Add method allows different classes of design to be added.

When the Add method is used no field values can be passed to the design using the *ListFields feature. The user is in control of the process and needs to pass any data in to the new design instance programmatically.

Having the ability to add different types of design makes dealing with complex UI requirements far simpler.


Result Parameter

Reference to the Item (#Prim_Tile.TileItem) created by the Add method.


DesignType Parameter

Class of the design instance to be created.

The class specified must inherit from the class specified as the parameterized type on the Tile DEFINE_COM.


DeleteAll Method

As the name suggests, this method deletes all items in the list.

This is equivalent to using the Clr_list command.


FindItem Method

FindItem calls the OnFind method on the Design Interface for each item.

Each Tile item is called in sequence, receiving the value to be tested and returning a boolean result. Once a positive result is returned, the Find will end. It can be started again from the item that returns the result.

Mthroutine Name(Search)

Define_Com Class(#Prim_Tile.TileItem) Name(#FoundItem) Reference(*dynamic)
Begin_Loop
#FoundItem <= #Tree.FindItem( #Search #FoundItem )
Leave If(#FoundItem *Is *null)

End_Loop
Endroutine


Result Parameter

Reference to the first item (#Prim_Tile.TileItem) to return a positive result.


Key Parameter

Value or object to be searched for.

Key is a variant allowing it to carry any type of value or object.


Item Parameter

Reference to the Item (#Prim_Tile.TileItem) after which to start the search.

If no StartItem is specified, the search will start at the beginning.


iTileDesign Interface

The iTileDesign must be implemented by any reusable part that is to be used as a Design for a Tile control (#Prim_Tile). The interface contains a series of methods through which the Tile can communicate with the design instance to inform it of changes to its state e.g. Selection, Focus etc.

The source below shows the Begin_com for reusable part implementing the appropriate design for Prim_tile as well as the *Listfields feature which defines the fields to be received by the design when it is ADD_ENTRY is used to create the item.

Begin_Com Role(*EXTENDS #Prim_Panl3 *implements #Prim_Tile.iTileDesign *ListFields #ListFields)

* Fields received as on Add_entry
Group_By Name(#ListFields) Fields(#Empno #Surname #Givename #Deptment #Section #Deptdesc #Secdesc)


OnAdd Method

OnAdd is executed when the design instance is first added to the list via either ADD_ENTRY or use of the ADD Method.

Any fields specified in the *ListFields feature of Begin_Com Role parameter will have been populated prior to the execution of this method when using ADD_ENTRY.


Tile Item

Reference to the corresponding Tile Item (#Prim_Tile.TileItem) created when the design was added.


OnDelete Method

OnDelete is executed when corresponding item is in the process of being deleted.

The design instance will be destroyed as part of the delete, assuming no other references to the design exist.


Tile Item

Reference to the corresponding Tile Item (#Prim_Tile.TileItem) being deleted.


OnDisplaying Method

OnDisplaying is executed whenever the Design is about to be in the visible portion of the User Design Control.

This allows the user to delay the processing of the Design until it is necessary rather than when it is created. This is useful for situations where the UDC has many items or the processing is relatively long running.


Tile Item

Reference to the corresponding Tile Item (#Prim_Tile.TileItem) for the design about to be displayed.


OnFind Method

OnFind is executed when the Find method is used on the parent user designed control.

Each item is called in sequence, receiving the value to be tested and returning a boolean result. Once a positive result is returned, the Find will end. It can be started again from the item that returns the result.

Mthroutine Name(OnFind) Options(*Redefine)
#Result := #Surname.Contains( #Key )
Endroutine


Result Parameter

Set the Result to indicate whether the Find was successful.


TileItem Parameter

Reference to the corresponding Tile Item (#Prim_Tile.TileItem) for the design.


OnItemGotFocus Method

Executed when the design instance becomes the focus instance.

Similar to a list or tree, an item becomes focus when the user clicks or positions the cursor within the bounds of the design.

There is no automatic visual feedback when the item gets or loses focus. The user is responsible for adding/removing styles.


OnItemLostFocus Method

Executed when the design instance is about to lose focus.

There is no automatic visual feedback when the item gets or loses focus. The user is responsible for adding/removing styles.


OnItemGotSelection Method

Executed when the design instance becomes selected.

Similar to a list or tree, an item becomes selected when the user clicks or positions the cursor within the bounds of the design.

There is no automatic visual feedback when the item gets or loses selection. The user is responsible for adding/removing styles.


OnItemLostSelection Method

Executed when the design instance is about to lose selection.

There is no automatic visual feedback when the item gets or loses selection. The user is responsible for adding/removing styles.


OnUpdate Method

OnUpdate is executed when UPD_ENTRY is used to update the corresponding item.


Tile Item

Reference to the corresponding Tile Item (#Prim_Tile.TileItem) being updated.


Tile Property

Reference to the parent Tile (#Prim_Tile) control


Tile Item (Prim_Tile.TileItem)

Tile Items are created whenever an entry is added to the Tile (Prim_Tile) e.g. ADD_ENTRY or the Tile Add method.

For every item that is added, a corresponding user defined Design instance is created that provides the visual portion of the control.


Design Property

Reference to a Tile Design (#Prim_Tile.iTileDesign)

Provides access to the corresponding Design instance created when the entry was added to the Tile.


Carousel (Prim_Caro)

DirectX Only

Carousel is a member of a group of list related primitive controls referred to as User Designed Controls.

Carousel organises individual design panels, typically images, in to linear or elliptical sequence with only one central design panel being fully visible

UDCs can be manipulated by the use of the typical LANSA list commands ADD_ENTRY, UPD_ENTRY etc. When entries are added to the list, an instance of the design is made, fields can be passed in, and a corresponding list item is made. UDCs control the position of the item within the list, manage selection, focus, expand/collapse etc., and communicate with the individual item designs through a series of predefined methods published on an interface specific to the type of UDC. For Prim_Caro this is #Prim_Caro.iCarouselDesign

All UDCs use a parameterized type to define the class of the design to be created each time an entry is added. This is specified on the DEFINE_COM as below

Define_Com Class(#Prim_Caro<#MyCarouselDesign>) Name(#Carousel)

Because of the overhead of making a reusable part instance compared to a simple item for a tree view (#Prim_TRVW) or list view (#Prim_LTVW), UDCs are not designed to be used with many thousand items. For high volume scenarios, other techniques are recommended.


CarouselStyle Property

A carousel can be viewed in two ways

Linear

Items will be organised across the screen, left to right and equally spaced.

The control will only show as many item as can fit in the control.

Elliptical

Designs will be organised in an elliptical fashion.

The ellipse is sized to fit on the screen and all items will be visible.


Items Property

Collection of all the items currently in the Carousel.


NavigationStyle Property

Buttons

Show the default navigation buttons.

None

Hide the default navigation buttons.


Carousel Event Item

DirectX Only

Reference to an instance of a Carousel Item (#Prim_Caro.CarouselItem).

The item supplied on the event is a reference to the item currently being processed.


Result Parameter

Reference to the Item (#Prim_Caro.CarouselItem) created by the Add method.


DesignType Parameter

Class of the design instance to be created.

The class specified must inherit from the class specified as the parameterized type on the Carousel DEFINE_COM.


FindItem Method

FindItem calls the OnFind method on the Design Interface for each item.

Each item is called in sequence, receiving the value to be tested and returning a boolean result. Once a positive result is returned, the Find will end. It can be started again from the item that returns the result.

Mthroutine Name(Search)
Define_Com Class(#Prim_Caro.CarouselItem) Name(#FoundItem) Reference(*dynamic)
Begin_Loop
#FoundItem <= #Tree.FindItem( #Search #FoundItem )
Leave If(#FoundItem *Is *null)
End_Loop
Endroutine


Result Parameter

Reference to the first item (#Prim_Caro.CarouselItem) to return a positive result.


Item Parameter

Reference to the Item (#Prim_Caro.CarouselItem) after which to start the search.

If no StartItem is specified, the search will start at the beginning.


FirstItem Method

Set the first item in the Carousel to be the focus item.


Animate Parameter

True

Animate the move showing the some of the items between the current item and the first

False

Jump to the first item without showing any other items


LastItem Method

Set the last item in the Carousel to be the focus item.


Animate Parameter

True

Animate the move showing the some of the items between the current item and the last

False

Jump to the last item without showing any other items


MoveToItem Method

Move to the item specified in the Position parameter.


Position Parameter

Specifies the item to become the active item.


Animate Parameter

True

Animate the move showing the some of the items between the current item and the target item

False

Jump to the target item without showing any other items


NextItem Method

Set the next item in the Carousel to be the focus item.


Animate Parameter

True

Animate the move to the next item

False

Jump to the next item without animating


PrevItem Method

Set the previous item in the Carousel to be the focus item.


Animate Parameter

True

Animate the move to the previous item

False

Jump to the previous item without animating


iCarouselDesign Interface

The iCarouselDesign must be implemented by any reusable part that is to be used as a Design for a Carousel control (#Prim_Caro). The interface contains a series of methods through which the Carousel can communicate with the design instance to inform it of changes to its state e.g. Selection, Focus etc.

The source below shows the Begin_com for reusable part implementing the appropriate design for Prim_Caro as well as the *Listfields feature which defines the fields to be received by the design when it is ADD_ENTRY is used to create the item.

Begin_Com Role(*EXTENDS #Prim_Panl *implements #Prim_Caro.iCarouselDesign *ListFields #ListFields)

* Fields received as on Add_entry
Group_By Name(#ListFields) Fields(#Empno #Surname #Givename #Deptment #Section #Deptdesc #Secdesc)


CarouselItem Parameter

Reference to the corresponding Carousel Item (#Prim_Caro.CarouselItem) created when the design was added.


CarouselItem Parameter

Reference to the corresponding Carousel Item (#Prim_Caro.CarouselItem) being deleted.


CarouselItem Parameter

Reference to the corresponding Carousel Item (#Prim_Caro.CarouselItem) for the design about to be displayed.


CarouselItem Parameter

Reference to the corresponding Carousel Item (#Prim_Caro.CarouselItem) for the design.


CarouselItem Parameter

Reference to the corresponding Carousel Item (#Prim_Caro.CarouselItem) being updated.


Carousel Items (Prim_Carousel.iCarouselItems)

Collection of all items currently in the Carousel (#Prim_Caro)


Carousel Property

Reference to the parent Carousel (#Prim_Caro) control


Carousel Item (Prim_Carousel.iCarouselItem)

Carousel Items are created whenever an entry is added to the Carousel (Prim_Caro) e.g. ADD_ENTRY or the Carousel Add method.

For every item that is added, a corresponding user defined Design instance is created that provides the visual portion of the control.


Book (Prim_Book)

DirectX Only

Book is a member of a group of list related primitive controls referred to as User Designed Controls.

Book organises individual design panels as though they were pages of a book.

UDCs can be manipulated by the use of the typical LANSA list commands ADD_ENTRY, UPD_ENTRY etc. When entries are added to the list, an instance of the design is made, fields can be passed in, and a corresponding list item is made. UDCs control the position of the item within the list, manage selection, focus, expand/collapse etc., and communicate with the individual item designs through a series of predefined methods published on an interface specific to the type of UDC. For Prim_Book this is #Prim_Book.iBookDesign

All UDCs use a parameterized type to define the class of the design to be created each time an entry is added. This is specified on the DEFINE_COM as below

Define_Com Class(#Prim_Book<#MyBookDesign>) Name(#Book)

Because of the overhead of making a reusable part instance compared to a simple item for a tree view (#Prim_TRVW) or list view (#Prim_LTVW), UDCs are not designed to be used with many thousand items. For high volume scenarios, other techniques are recommended.


Items Property

Collection of all the items currently in the Book.


Book Event Item

DirectX Only

Reference to an instance of a Book Item (#Prim_Book.BookItem).

The item supplied on the event is a reference to the item currently being processed.


Result Parameter

Reference to the Item (#Prim_Book.BookItem) created by the Add method.


DesignType Parameter

Class of the design instance to be created.

The class specified must inherit from the class specified as the parameterized type on the Book DEFINE_COM.


FindItem Method

FindItem calls the OnFind method on the Design Interface for each item.

Each item is called in sequence, receiving the value to be tested and returning a boolean result. Once a positive result is returned, the Find will end. It can be started again from the item that returns the result.

Mthroutine Name(Search)
Define_Com Class(#Prim_Book.BookItem) Name(#FoundItem) Reference(*dynamic)
Begin_Loop
#FoundItem <= #Tree.FindItem( #Search #FoundItem )
Leave If(#FoundItem *Is *null)
End_Loop
Endroutine


Result Parameter

Reference to the first item (#Prim_Book.BookItem) to return a positive result.


Item Parameter

Reference to the Item (#Prim_Book.BookItem) after which to start the search.

If no StartItem is specified, the search will start at the beginning.


FirstItem Method

Set the first item in the Book to be the focus item.


LastItem Method

Set the last item in the Book to be the focus item.


NextItem Method

Set the next item in the Book to be the focus item.


PrevItem Method

Set the previous item in the Book to be the focus item.


iBookDesign Interface

The iBookDesign must be implemented by any reusable part that is to be used as a Design for a Book control (#Prim_Book). The interface contains a series of methods through which the Book can communicate with the design instance to inform it of changes to its state e.g. Selection, Focus etc.

The source below shows the Begin_com for reusable part implementing the appropriate design for Prim_Book as well as the *Listfields feature which defines the fields to be received by the design when it is ADD_ENTRY is used to create the item.

Begin_Com Role(*EXTENDS #Prim_Panl3 *implements #Prim_Book.iBookDesign *ListFields #ListFields)

* Fields received as on Add_entry
Group_By Name(#ListFields) Fields(#Empno #Surname #Givename #Deptment #Section #Deptdesc #Secdesc)


BooklItem Parameter

Reference to the corresponding Book Item (#Prim_Book.BookItem) created when the design was added.


BookItem Parameter

Reference to the corresponding Book Item (#Prim_Book.BookItem) being deleted.


BookItem Parameter

Reference to the corresponding Book Item (#Prim_Book.BookItem) for the design about to be displayed.


BookItem Parameter

Reference to the corresponding Book Item (#Prim_Book.BookItem) for the design.


Book Property

Reference to the parent Book (#Prim_Book) control


Book Item (Prim_Book.BookItem)

Book Items are created whenever an entry is added to the Book (Prim_Book) e.g. ADD_ENTRY or the Book Add method.

For every item that is added, a corresponding user defined Design instance is created that provides the visual portion of the control.


Tree (Prim_Tree)

DirectX Only

Tree is a member of a group of list related primitive controls referred to as User Designed Controls.

Tree organises individual design panels in to a hierarchical structure very similar to that of tree view (#Prim_trvw).

UDCs can be manipulated by the use of the typical LANSA list commands ADD_ENTRY, UPD_ENTRY etc. When entries are added to the list, an instance of the design is made, fields can be passed in, and a corresponding list item is made. UDCs control the position of the item within the list, manage selection, focus, expand/collapse etc., and communicate with the individual item designs through a series of predefined methods published on an interface specific to the type of UDC. For Prim_Tree this is #Prim_Tree.iTreeDesign

All UDCs use a parameterized type to define the class of the design to be created each time an entry is added. This is specified on the DEFINE_COM as below

Define_Com Class(#Prim_Tre<#MyTreeDesign>) Name(#Tree)

Because of the overhead of making a reusable part instance compared to a simple item for a tree view (#Prim_TRVW) or list view (#Prim_LTVW), UDCs are not designed to be used with many thousand items. For high volume scenarios, other techniques are recommended.


Items Property

Collection of all the items currently in the Tree.


Selection Style Property

All

Any item in the tree can be selected regardless of its position

Single

Only one item can be selected at any given moment

SameParent

Mulitple items can be selected provided they are all parented to the same item

SameLevel

Mulitple items can be selected provided they are all parented to the items with the same parent


Tree Event Item

DirectX Only

Reference to an instance of a Tree Item (#Prim_Tree.TreeItem).

The item supplied on the event is a reference to the item currently being processed.


ItemCollapsed Event

An item in the tree has just collapsed. All child nodes will no longer be visible to the user.

This corresponds to the OnItemCollapsed Method of the Tree design interface (#Prim_Tree.iTreeDesign)


ItemExpanding Event

An item in the tree is expanding. All child nodes will be shown immediately below the expanding item.

This corresponds to the OnItemExpanding Method of the Tree design interface (#Prim_Tree.iTreeDesign)


ItemGotParent Event

The ParentItem property of a tree item has been assigned to either another item in the tree or null.

This corresponds to the OnItemGotParent Method of the Tree design interface (#Prim_Tree.iTreeDesign)


Result Parameter

Reference to the Item (#Prim_Tree.TreeItem) created by the Add method.


DesignType Parameter

Class of the design instance to be created.

The class specified must inherit from the class specified as the parameterized type on the Tree DEFINE_COM.


FindItem Method

FindItem calls the OnFind method on the Design Interface for each item.

Each Tree item is called in sequence, receiving the value to be tested and returning a boolean result. Once a positive result is returned, the Find will end. It can be started again from the item that returns the result.

Mthroutine Name(Search)
Define_Com Class(#Prim_Tree.TreeItem) Name(#FoundItem) Reference(*dynamic)
Begin_Loop
#FoundItem <= #Tree.FindItem( #Search #FoundItem )
Leave If(#FoundItem *Is *null)
End_Loop
Endroutine


Result Parameter

Reference to the first item (#Prim_Tree.TreeItem) to return a positive result.


Item Parameter

Reference to the Item (#Prim_Tree.TreeItem) after which to start the search.

If no StartItem is specified, the search will start at the beginning.


iTreeDesign Interface

The iTreeDesign must be implemented by any reusable part that is to be used as a Design for a Tree control (#Prim_Tree). The interface contains a series of methods through which the Tree can communicate with the design instance to inform it of changes to its state e.g. Selection, Focus etc.

The source below shows the Begin_com for reusable part implementing the appropriate design for Prim_tree as well as the *Listfields feature which defines the fields to be received by the design when it is ADD_ENTRY is used to create the item.

Begin_Com Role(*EXTENDS #Prim_Panl3 *implements #Prim_Tree.iTreeDesign *ListFields #ListFields)

* Fields received as on Add_entry
Group_By Name(#ListFields) Fields(#Empno #Surname #Givename #Deptment #Section #Deptdesc #Secdesc)


Tree Item Parameter

Reference to the corresponding Tree Item (#Prim_Tree.TreeItem) created when the design was added.


Tree Item Parameter

Reference to the corresponding Tree Item (#Prim_Tree.TreeItem) being deleted.


Tree Item Parameter

Reference to the corresponding Tree Item (#Prim_Tree.TreeItem) for the design about to be displayed.


TreeItem Parameter

Reference to the corresponding Tree Item (#Prim_Tree.TreeItem) for the design.


OnItemCollapsed Method

Executed when the corresponding item collapsed through the use of the Collapse method or by setting the Expanded property to false.

This method allows the user to change the design appearance to indicate that the item has collapsed. E.g. Show an appropriate collapsed image.


OnItemExpanding Method

Executed when the corresponding item is expanded through the use of the Expand method or by setting the Expanded property to true.

This method allows the user to change the design appearance to indicate that the item has collapsed. E.g. Show an appropriate expanded image.


OnItemGotParent Method

Executed when the corresponding item's Parent is changed by setting the ParentItem Property.Expand

This method allows the user to change the design appearance to indicate that the item has changed parent e.g. increment the left margin to increase the indent.


Tree Property

Reference to the parent Tree (#Prim_Tree) control


Tree Item (Prim_Tree.TreeItem)

Tree Items are created whenever an entry is added to the Tree (#Prim_Tree) e.g. ADD_ENTRY or the Tree Add method.

For every item that is added, a corresponding user defined Design instance is created that provides the visual portion of the control.


Design Property

Reference to a Tree Design (#Prim_Tree.iTreeDesign)

Provides access to the corresponding Design instance created when the entry was added to the Tree.


Expanded Property

The item is expanded. All child items will be visible.


FocusedStyle Property

Reference to a Style (#Prim_Vs.Style) to be applied to the design when the item becomes the focus item.

The Style will be removed as soon as the item loses focus.

Mthroutine Name(OnAdd) Option(*Redefine)
#TreeItem.FocusStyle <= # MyStyles<Focus>
Endroutine


FocusedStyles Property

Collection of Style (#Prim_Vs.Style) to be applied to the design when the item becomes the focus item.

The Styles will be removed as soon as the item loses focus.


MarginBottom Property

Defines the size in pixels of the margin to be applied to the bottom of the item.


MarginLeft Property

Defines the size in pixels of the margin to be applied to the left of the item.


MarginRight Property

Defines the size in pixels of the margin to be applied to the right of the item.


MarginTop Property

Defines the size in pixels of the margin to be applied to the top of the item.


ParentItem Property

Reference to a TreeItem (#Prim_Tree.TreeItem)

By setting the ParentItem property items within the tree can be formed in to complex hierarchies.

TreeItems cannot be parented to items in different Trees.


SelectedStyle Property

Reference to a Style (#Prim_Vs.Style) to be applied to the design when the item becomes selected.

The Style will be removed as soon as the item loses selection.

Mthroutine Name(OnAdd) Option(*Redefine)
#TreeItem.SelectedStyle <= # MyStyles<Focus>
Endroutine


SelectedStyles Property

Collection of Style (#Prim_Vs.Style) to be applied to the design when the item becomes selected.

The Styles will be removed as soon as the item loses selection.


Style Property

Denotes the Style (#Prim_vs.Style) to be applied to an item. When the Style property is set, all Styles previously applied to the item are removed.


Styles Property

Collection of Styles (#Prim_vs.Style) to be applied to a control.

Styles allows for more complex programmatic appearance changes to be coded. Rather than relying on the declarative single Style property, the developer is free to add as many Style layers as required.


System Application Controls


Focus Control Changed Event

FocusControlChanged is fired whenever focus moves to a different control.

This is equivalent to the GotFocus event found on all controls (#Prim_CTRL)


Control Parameter

Reference to the control (#Prim_CTRL) that is focus.


Appearance Property

Reference to a Prim_Vs.Appearance instance.

The Appearance property provides a central location for default styles for each control to be applied, either at application startup or at runtime.


Calendar Property

Reference to a Style (#Prim_VS) to be applied to all calendar (#Prim_MTCL) instances.


CheckBox Property

Reference to a Style (#Prim_VS) to be applied to all check box (#Prim_CKBX) instances.


ComboBox Property

Reference to a Style (#Prim_VS) to be applied to all combo box (#Prim_CMBX) instances.


DateTime Property

Reference to a Style (#Prim_VS) to be applied to all DateTime (#Prim_CMBX) instances including date time fields.


Edit Property

Reference to a Style (#Prim_VS) to be applied to all edit (#Prim_EDIT) instances. This includes edits when used as part of an entry field (#Prim_EVEF)


Grid Property

Reference to a Style (#Prim_VS) to be applied to all grid (#Prim_GRID) instances.


GridFocused Property

Reference to a Style (#Prim_VS) to be applied to all grid item (#Prim_GDIT) instances when they become focus and the grid is the focus control.


GridFocusedInactive Property

Reference to a Style (#Prim_VS) to be applied to all grid item (#Prim_GDIT) instances when they are the focus item but the grid is not the focus control.


GridSelectedInactive Property

Reference to a Style (#Prim_VS) to be applied to all grid item (#Prim_GDIT) instances when they are selected, but the grid is not the focus control.


GridMouseOver Property

Reference to a Style (#Prim_VS) to be applied to all grid item (#Prim_GDIT) instances when the mouse enters their bounds.


GridSelected Property

Reference to a Style (#Prim_VS) to be applied to all grid item (#Prim_GDIT) instances when they become selected and the grid is the focus control.


GroupBox Property

Reference to a Style (#Prim_VS) to be applied to all group box (#Prim_GPBX) instances.


Image Property

Reference to a Style (#Prim_VS) to be applied to all image (#Prim_IMGE) instances.


Label Property

Reference to a Style (#Prim_VS) to be applied to all label (#Prim_LABL) instances.


List Box Property

Reference to a Style (#Prim_VS) to be applied to all list box (#Prim_LTBX) instances.


ListBoxFocused Property

Reference to a Style (#Prim_VS) to be applied to all list box item (#Prim_LBIT) instances when they become focus and the grid is the focus control.


ListboxFocusedInactive Property

Reference to a Style (#Prim_VS) to be applied to all listbox item (#Prim_LBIT) instances when they are the focus item but the listbox is not the focus control.


ListboxSelectedInactive Property

Reference to a Style (#Prim_VS) to be applied to all listbox item (#Prim_LBIT) instances when they are selected, but the listbox is not the focus control.


ListboxSelectedInactive Property

Reference to a Style (#Prim_VS) to be applied to all listview item (#Prim_LVIT) instances when they are selected, but the listview is not the focus control.


ListBoxMouseOver Property

Reference to a Style (#Prim_VS) to be applied to all list box item (#Prim_LBIT) instances when the mouse enters their bounds.


ListBoxSelected Property

Reference to a Style (#Prim_VS) to be applied to all list box item (#Prim_LBIT) instances when they become selected and the grid is the focus control.


List View Property

Reference to a Style (#Prim_VS) to be applied to all list view (#Prim_LTVW) instances.


ListViewFocused Property

Reference to a Style (#Prim_VS) to be applied to all list view item (#Prim_LVIT) instances when they become focus and the list view is the focus control.


ListviewFocusedInactive Property

Reference to a Style (#Prim_VS) to be applied to all listview item (#Prim_LVIT) instances when they are the focus item but the listview is not the focus control.


ListViewMouseOver Property

Reference to a Style (#Prim_VS) to be applied to all list view item (#Prim_ LVIT) instances when the mouse enters their bounds.


ListViewSelected Property

Reference to a Style (#Prim_VS) to be applied to all list view item (#Prim_ LVIT) instances when they become selected and the list view is the focus control.


Memo Property

Reference to a Style (#Prim_VS) to be applied to all memo (#Prim_MEMO) instances.


Panel Property

Reference to a Style (#Prim_VS) to be applied to all panel (#Prim_PANL) instances.


Popup Property

Reference to a Style (#Prim_VS) to be applied to all popup panel (#Prim_PPNL) instances.


ProgressBar Property

Reference to a Style (#Prim_VS) to be applied to all progress bar (#Prim_PGBR) instances.


PushButton Property

Reference to a Style (#Prim_VS) to be applied to all push button (#Prim_PHBN) instances.


RadioButton Property

Reference to a Style (#Prim_VS) to be applied to all radio button (#Prim_RDBN) instances.


SpeedButton Property

Reference to a Style (#Prim_VS) to be applied to all speed button (#Prim_SPBN) instances.


SpinEdit Property

Reference to a Style (#Prim_VS) to be applied to all spin edit (#Prim_SPDT) instances.


Tab Property

Reference to a Style (#Prim_VS) to be applied to all tab (#Prim_TAB) instances.


TrackBar Property

Reference to a Style (#Prim_VS) to be applied to all spin edit (#Prim_TKBR) instances.


Tree Property

Reference to a Style (#Prim_VS) to be applied to all tree (#Prim_TRVW) instances.


TreeFocused Property

Reference to a Style (#Prim_VS) to be applied to all tree item (#Prim_TVIT) instances when they become focus and the tree is the focus control.


TreeviewFocusedInactive Property

Reference to a Style (#Prim_VS) to be applied to all treeview item (#Prim_TVIT) instances when they are the focus item but the treeview is not the focus control.


TreeboxSelectedInactive Property

Reference to a Style (#Prim_VS) to be applied to all treeview item (#Prim_TVIT) instances when they are selected, but the treeview is not the focus control.


TreeMouseOver Property

Reference to a Style (#Prim_VS) to be applied to all tree item (#Prim_ TVIT) instances when the mouse enters their bounds.


TreeSelected Property

Reference to a Style (#Prim_VS) to be applied to all tree item (#Prim_ TVIT) instances when they become selected and the tree view is the focus control.


Cursors Property

Collection of standard cursors (#Prim_CRSR) adopted from the Windows theme.

Cursors can be applied to controls so that the cursor changes when the mouse enters or leaves the bounds of a control. For most situations Visual LANSA will manage the cursor correctly without the developer needing to change it.

#Button.Cursor <= #sys_Appln.Cursors<Hand>


FocusControl Property

Reference to the control (#Prim_CTRL) that is focus.


GlassEnabled Property

Determines whether the application is running in an environment where a form may have a glass (#Prim_Form.Glass) appearance.

True

The form is configured to have a glass appearance and the application is currently capable of running with glass.

False

Either the form is not configured to have a glass appearance or the application is currently incapable of running with glass.


HelpHandlerProperty

Reference to an instance of a reusable a component that implements the HelpHandler Interface (#Prim_App.iHelpHandler)

By specifying a help handler, the developer can replace the default F1 help behavior.


Images Property

Collection of standard images (#Prim_BMP) adopted from the Windows theme.

Images are useful when constructing user defined controls, particularly user trees (#Prim_TREE), so that applications can have a consistent look and feel.

#ExpandCollapse.image <= #sys_appln.Images<ExplorerCollapsed>


Operating System Property

Name of the operating system currently on which the application is executing.


PartitionShortCharLength Property

Provides access to the current partition short char. length based on the PartitionShortCharLevel property.


PartitionShortCharLevel Property

Provides access to the current partition short char. level property.


RenderStyle Property

Equivalent to the RNDR X_Run argument, RenderStyle provides access to the current rendering engine for the application

Win32

The application is using the Win32 rendering engine and no DirectX rendering is possible. This is equivalent to a RNDR value of W

Win32AndDirectX

The application is using the Win32 rendering engine but supports the use of DirectX on specific components. This is equivalent to a RNDR value of M

DirectX

The application is using the DirectX rendering engine but supports the use of Win32 for specified forms. This is equivalent to a RNDR value of X


Style Property

Reference to a Style (#Prin_VS.Style) to be applied to the whole application.

The style specified will be adopted by all forms and reusable parts.


Styles Property

Collection of Styles (#Prin_VS.Style) to be applied to the whole application.

The styles specified will be adopted by all forms and reusable parts.


TraceHandlerProperty

Reference to an instance of a reusable a component that implements the TraceHandler Interface (#Prim_App.iTraceHandler)

By specifying a trace handler, the developer can implement their own tracing mechanism.


Ribbon Controls


Touch

Touch Properties

Touch Events

Touch Parameters


Touch Properties

Touch Scroll Property

Touch Move Property

Touch Rotate Property

Touch Scale Property


Touch Scroll Property

DirectX Only

Determines how list controls such as Listview and Grid will respond when swiped.

Both

The list will scroll both vertically and horizontally.

Horizontal

The list will only scroll control horizontally.

Parent

Default – All touch move processing will be directed to the parent control. Touch events will be processed as normal mouse events causing selection and focus to fire.

Vertical

The list will only scroll control vertically.


Touch Move Property

DirectX Only

Determines how the control will respond to touch move processing.

Touch movements will directly affect the Top and Left properties of the control.

Both

The control can be moved both vertically and horizontally.

Horizontal

The control can only move along the horizontal axis.

Parent

Default – All touch move processing will be directed to the parent control.

Vertical

The control can only move along the vertically axis.


Touch Rotate Property

DirectX Only

Determines how the control will respond to touch rotation.

Touch rotation will directly affect the Rotation property of the control.

Yes

The control can be rotated using touch.

Parent

Default – All touch rotation processing will be directed to the parent control.


Touch Scale Property

DirectX Only

Determines how the control will respond to touch scaling.

Touch scaling will directly affect the ScaleHeight and ScaleWidth poperties of the control.

Yes

The control can be scaled using touch.

Parent

Default – All touch scaling processing will be directed to the parent control.


Touch Events

Touch Start Event

Touch End Event

Touch Change Event


Touch Start Event

DirectX Only

Fired when the user first makes physical contact with the screen.


Touch End Event

DirectX Only

Fired when the user stops touching the screen.


Touch Change Event

DirectX Only

Fired repeatedly between the TouchStart and TouchEnd boundaries to provide details of the touch events.

Having access to the details of a touch event allows the developer to control the nature of the touch processing. For example, the following code stops an image being moved beyond the bounds of its parent control.

Evtroutine Handling(#Image.TouchChange)

#Image.Top := #Image.Top.Bound( 0 (#Com_owner.Height - #Image.Height) )

#Image.Left := #Image.Left.Bound( 0 (#com_owner.Width - #Image.Width) )

Endroutine


Touch Parameters

MoveLeft Parameter

MoveTop Parameter

ScaleHeight Parameter

ScaleWidth Parameter

Rotation Parameter

Continue Parameter


MoveLeft Parameter

DirectX Only

Returns the number of pixels moved horizontally for each instance of the TouchChange event.


MoveTop Parameter

DirectX Only

Returns the number of pixels moved vertically for each instance of the TouchChange event.


ScaleHeight Parameter

DirectX Only

Returns the percentage scale height change for each instance of the TouchChange event.


ScaleWidth Parameter

DirectX Only

Returns the percentage scale width change for each instance of the TouchChange event.


Rotation Parameter

DirectX Only

Returns the rotation change in degrees for each instance of the TouchChange event.


Continue Parameter

DirectX Only

Allow touch processing to be stopped if required.

True

Default – Processing will continue as normal.

False

Touch processing will be halted.


Disclaimer

While every effort has been made to ensure that the information in the LANSA documentation is accurate. In no event shall LANSA be liable for any damages arising from its use.

LANSA MAKES NO WARRANTIES, EXPRESSED OR IMPLIED.

Copyright and trademark information

© LANSA. "LANSA" is a trade name and registered trademark of LANSA in the United States of America, Australia, the United Kingdom and other countries. All rights reserved.

The following are some companies which require attribution:

Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Microsoft, Windows, .NET and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.

Other company, product, and service names may be trademarks or service marks of others.

This material may contain other proprietary notices and copyright information, the terms of which must be observed and followed.


Column

BASIC_LAYOUTCOLUMNHELP

Reference to a Column (#prim_tblo.Column)

In conjunction with the ColumnSpan property, defines the start position and horizontal extent of the control managed by the item.


ColumnSpan

BASIC_LAYOUTCOLUMNSPANHELP

In conjunction with the Column property, defines the start position and horizontal extent of the control managed by the item.


Height Column

LPVOLAYOUTHEIGHTHELP

In conjunction with the Units property determines the height of the row.

Height is numeric and represents either specific number of pixels or a proportion of the available space.


Row

BASIC_LAYOUTROWHELP

Reference to a Row (#prim_tblo.Row)

In conjunction with the RowSpan property, defines the start position and vertical extent of the control managed by the item.


RowSpan

BASIC_LAYOUTROWSPANHELP

In conjunction with the Row property, defines the start position and vertical extent of the control managed by the item.


Table Column

LPVOTABLELAYOUTCOLUMNCLASSHELP

Used to define the width of columns as part of a table layout.

In the example below there are 3 columns. The first is 25 pixels wide. The two remaining columns are proportional and share the remaining space equally.

Define_Com Class(#prim_tblo) Name(#TableLayout)
Define_Com Class(#Prim_tblo.Column) Name(#Column1) Parent(#TableLayout) Units(Pixels) Width(25)
Define_Com Class(#Prim_tblo.Column) Name(#Column2) Parent(#TableLayout)
Define_Com Class(#Prim_tblo.Column) Name(#Column3) Parent(#TableLayout)


Table Item

LPVOTABLELAYOUTITEMCLASSHELP

Used to determine the size and position of the control being managed by the item.


Table Layout

LPVOTABLELAYOUTCLASSHELP

Table Layout divide a control in to rows and columns similar to a grid layout or table in Microsoft Word.


Table Row

LPVOTABLELAYOUTROWCLASSHELP

Used to define the height of rows as part of a table layout.

In the example below there are 3 rows. The first is 25 pixels wide. The two remaining columns are proportional and share the remaining space equally.

Define_Com Class(#prim_tblo) Name(#TableLayout)
Define_Com Class(#Prim_tblo.Row) Name(#Row1) Parent(#TableLayout) Units(Pixels) Width(25)
Define_Com Class(#Prim_tblo.Row) Name(#Row2) Parent(#TableLayout)
Define_Com Class(#Prim_tblo.Row) Name(#Row3) Parent(#TableLayout)


Units

LPVOLAYOUTUNITSHELP

In conjunction with the Width/Height properties determines the size of the column/row.

Pixels

The column/row will be as wide/high in pixels as the value specified in the Width/Height property.

Proportion

The size is defined as a proportion of the available remaining space after columns/rows with a fixed size are evaluated.

In the example below, Column1 would use 40% of the available space while Column2 would use 60%

Define_Com Class(#Prim_tblo.Column) Name(#Column1) Parent(#TableLayout) Width(2)
Define_Com Class(#Prim_tblo.Column) Name(#Column2) Parent(#TableLayout) Width(3)


Width

LPVOLAYOUTWIDTHHELP

In conjunction with the Units property determines the width of the column.

Width is numeric and represents either specific number of pixels or a proportion of the available space.