Set the alignment of listbox
column.
Note :
ListColumnAlignment is not needed, when the column
properties of a listbox have already been set with
the Layout Editor.
The preferred way to set the properties of a custom listbox is using the Define Column Types dialog in Modify
Layout view. When in layouting mode, you can
select a listbox and then in the Listbox
section of the properties pane, you can open the editor of the Column
Count property (click a grey circle with 3 dots on it):
Parameters
:
Name |
Type |
Value |
Description |
listboxName |
String |
name |
ScreenFieldName
of the listbox to set a column alignment. Ctrl+Click
onto a listbox to retrieve its listboxName (= ScreenFieldName) |
column |
Integer |
0 - n |
Index of column to set its alignment. Column numbering starts at 0. The maximum number of visible columns
is 64. |
Alignment |
String |
LEFT |
Left-aligns contents of column. |
String |
CENTER |
Center-aligns contents of column. |
|
String |
RIGHT |
Right-aligns contents of column. |
|
String |
DECIMAL |
Decimal-Point-aligns contents of
column. |
Available in:
WindowMain |
WindowLink |
YES |
YES |
Hint :
You can find references to XojoScripts which make
use of this function by sending the following SQL statement to the database
:
Select id,GUID, ScriptName,ScriptCode from im_scripts
where ScriptCode Like '%ListColumnAlignment%'
Example XojoScript:
ListColumnAlignment ("imLB_evt_List3" ,2 ,"DECIMAL"
)
ListColumnAlignmentOffset ("imLB_evt_List3" ,2 ,-20 )