Difference between revisions of "PropertyListBox"
m (1 revision) |
|||
Line 37: | Line 37: | ||
|class=titleClass colspan=3|Properties | |class=titleClass colspan=3|Properties | ||
|- | |- | ||
− | |width=33%|{{Property | name=AutoCompleteMode | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=AutoCompleteMode | type=Boolean | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=CustomGridLinesHorizontal | type=Integer | description= | readonly=no | newinversion=1.4.0 | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=nameStyle | type=PropertyListStyle | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=BBCode | type=Boolean | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=BBCode | type=Boolean | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=CustomGridLinesVertical | type=Integer | description= | readonly=no | newinversion=1.4.0 | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=PropertyString | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ButtonColor | type=Picture | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ButtonColor | type=Picture | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=DefaultType | type=Integer | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=RBColorDisplay | type=Boolean | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ButtonEdit | type=Picture | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ButtonEdit | type=Picture | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=defaultvalueStyle | type=PropertyListStyle | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=Star | type=Picture | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ButtonPopupArrow | type=Picture | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ButtonPopupArrow | type=Picture | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=headerStyle | type=PropertyListStyle | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=SyntaxComment | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ButtonPopupArrowUp | type=Picture | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ButtonPopupArrowUp | type=Picture | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LastEditCell | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=TransparentString | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ColonString | type=String | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=ColonString | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LastError | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=ValueString | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=ColorGutter | type=Boolean | description= | readonly=no | newinversion=1.4.0 | version=1. | + | |width=33%|{{Property | name=ColorGutter | type=Boolean | description= | readonly=no | newinversion=1.4.0 | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LastValue | type=String | description= | readonly=no | newinversion= | version=1.6.0}} |
− | + | |width=33%|{{Property | name=valueStyle | type=PropertyListStyle | description= | readonly=no | newinversion= | version=1.6.0}} | |
|- | |- | ||
− | |width=33%|{{Property | name=CustomButtons | type=PropertyListButton | description= | readonly=no | newinversion= | version=1. | + | |width=33%|{{Property | name=CustomButtons | type=PropertyListButton | description= | readonly=no | newinversion= | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=LineCount | type=Integer | description= | readonly=yes | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=CustomGridLinesColor | type=Color | description= | readonly=no | newinversion=1.4.0 | version=1. | + | |width=33%|{{Property | name=CustomGridLinesColor | type=Color | description= | readonly=no | newinversion=1.4.0 | version=1.6.0}} |
− | |width=33%|{{Property | name= | + | |width=33%|{{Property | name=MacOSStyle | type=Boolean | description= | readonly=no | newinversion= | version=1.6.0}} |
|- | |- | ||
− | |width=33%|{{Property | name=CustomGridLinesHorizontal | type=Integer | description= | readonly=no | newinversion=1.4.0 | version=1. | + | |width=33%|{{Property | name=CustomGridLinesHorizontal | type=Integer | description= | readonly=no | newinversion=1.4.0 | version=1.6.0}} |
− | + | ||
|} | |} | ||
Line 88: | Line 87: | ||
|- | |- | ||
|width=50%|{{Method | name=CellValue | params=PropertyName As String, RaiseCellValueChanged As Boolean = False, Assigns Value As String | description= | newinversion=}} | |width=50%|{{Method | name=CellValue | params=PropertyName As String, RaiseCellValueChanged As Boolean = False, Assigns Value As String | description= | newinversion=}} | ||
− | |width=50%|{{Method | name= | + | |width=50%|{{Method | name=LoadFromXML | params=Str As String, keepValues As Boolean = False, AutoSetDefaultValues As Boolean = False | description= | returntype=Boolean | newinversion=}} |
|- | |- | ||
|width=50%|{{Method | name=CellValue | params=PropertyName As String, MathsEval As Boolean = False | description= | returntype=Variant | newinversion=}} | |width=50%|{{Method | name=CellValue | params=PropertyName As String, MathsEval As Boolean = False | description= | returntype=Variant | newinversion=}} | ||
+ | |width=50%|{{Method | name=NewRow | params=Name As String, Caption As String = "", isChild As Boolean = False | description= | newinversion=}} | ||
+ | |- | ||
+ | |width=50%|{{Method | name=ChangeSize | params=Increment As Integer | description= | newinversion=1.6.0}} | ||
|width=50%|{{Method | name=Reload | description= | newinversion=}} | |width=50%|{{Method | name=Reload | description= | newinversion=}} | ||
|- | |- | ||
Line 99: | Line 101: | ||
|width=50%|{{Method | name=ValuesForHeader | params=HeaderName As String, onlyVisible As Boolean = False | description= | returntype=Dictionary | newinversion=}} | |width=50%|{{Method | name=ValuesForHeader | params=HeaderName As String, onlyVisible As Boolean = False | description= | returntype=Dictionary | newinversion=}} | ||
|- | |- | ||
− | |width=50%|{{Method | name= | + | |width=50%|{{Method | name=LoadFromRecordSet | params=RS As RecordSet, IDField As Integer = 1, DisplayID As Boolean = False, DefaultType As Integer = 0 | description= | returntype=Boolean | newinversion=1.6.0}} |
|- | |- | ||
− | |width=50%|{{Method | name= | + | |width=50%|{{Method | name=LoadFromXML | params=Str As String, keepValues As Boolean = False, AutoSetDefaultValues As Boolean = False | description= | returntype=Boolean | newinversion=}} |
|} | |} | ||
Line 278: | Line 280: | ||
==History== | ==History== | ||
+ | |||
+ | ===Version 1.6.0 - Not released=== | ||
+ | *New: | ||
+ | **ChangeSize function, to increase or decrease text size. | ||
+ | **LoadFromRecordSet, Load data from a RecordSet. | ||
+ | |||
+ | ===Version 1.5.1 - Released December 28, 2012=== | ||
+ | *Fix: | ||
+ | **Compilation problem | ||
===Version 1.5.0 - Released November 24, 2012=== | ===Version 1.5.0 - Released November 24, 2012=== | ||
Line 356: | Line 367: | ||
− | BBCodeStorage, PropertyListButton, PropertyListLine, | + | BBCodeStorage, PropertyListButton, PropertyListLine, PropertyListStyle classes. |
PropertyListModule module. | PropertyListModule module. | ||
Listbox control. | Listbox control. |
Revision as of 22:59, 9 April 2013
This control is a subclass of the Listbox that was designed to act like REALbasic’s Property Listbox visible in the IDE when editing window contents, or the project tab.
The control is XML-driven, which means that the best way to display something in it, is to load an XML definition file specially made for it.
The creation of the XML file can be done with the "PropertyListbox Creator". This helps to show all available options for each type of cell, and also helps users who aren’t used to writing XML files.
To use this control, just drag it in a window, and in the open event, load an XML file, using the method: "me. LoadFromXML(XMLString As String)".
Events | |
ButtonPressed | ContentsChanged |
CellAction | DoubleClick |
CellClick | LoadingValueList |
CellColorClick | ShouldTriggerAutocomplete |
CellCustomEdit | |
CellValueChanged |
Methods | |
CellValue | LoadFromXML |
CellValue | NewRow |
ChangeSize | Reload |
GetLine | toXML |
GetLine | ValuesForHeader |
LoadFromRecordSet | |
LoadFromXML |
Shared Methods |
Register |
Contents
- 1 Notes
- 2 History
- 2.1 Version 1.6.0 - Not released
- 2.2 Version 1.5.1 - Released December 28, 2012
- 2.3 Version 1.5.0 - Released November 24, 2012
- 2.4 Version 1.4.0 - Released December 27, 2011
- 2.5 Version 1.3 - Released December 27, 2011
- 2.6 Version 1.2.1
- 2.7 Version 1.2 - Released
- 2.8 Version 1.1 - Released February 03, 2009
- 2.9 Version 1.0 - First Public Release
- 3 Note
- 4 See Also
Notes
XML definition
You can use this example as XML definition to load in the PropertyListBox.
<?xml version="1.0" encoding="UTF-8"?> <PropertyListBox version="1.1"> <name>PropertyListbox Example</name> <button id="0" text="Help"/> <contents> <header visible="True" expanded="True"> <name>Cell Types</name> <param type="1" visible="True"> <name>Normal</name> <value>Normal Text</value> </param> <param type="2" visible="True"> <name>CheckBox</name> <value>False</value> </param> <param type="3" visible="True"> <name>Editable</name> <value>Click to edit</value> </param> <param type="4" visible="True"> <name>Multiline Text</name> <value>Click to edit </value> </param> <param type="5" visible="True" required="True"> <name>List</name> <valuelist>Red|Green|Blue</valuelist> </param> <param type="6" visible="True"> <name>Editable List</name> <valuelist>Red|Green|Blue</valuelist> </param> <param type="6" visible="True" autocomplete="True"> <name>Autocomplete List</name> <valuelist>font_list</valuelist> </param> <param type="7" visible="True"> <name>Color</name> <value>&cDBDFFF</value> </param> <param type="8" visible="True"> <name>FolderItem (File)</name> </param> <param type="8" visible="True" folder="True"> <name>FolderItem (Folder)</name> </param> <param type="9" visible="True"> <name>RadioButton 1</name> <value>True</value> <helptag>Only one RadioButton per header can be checked at at time. RadioButton appear as checkboxes. However, RadioButtons and Checkboxes are independant</helptag> </param> <param type="9" visible="True"> <name>RadioButton 2</name> <value>False</value> <helptag>Only one RadioButton per header can be checked at at time. RadioButton appear as checkboxes. However, RadioButtons and Checkboxes are independant</helptag> </param> <param type="9" visible="True"> <name>RadioButton 3</name> <value>False</value> <helptag>Only one RadioButton per header can be checked at at time. RadioButton appear as checkboxes. However, RadioButtons and Checkboxes are independant</helptag> </param> <param type="10" visible="True"> <name>Rating</name> <value>3</value> </param> </header> <header visible="True" expanded="True" button="0"> <name>Header with Button</name> <param type="2" visible="True"> <name>Show Invisible Lines</name> <value>False</value> </param> <param type="1" visible="False"> <name>Invisible Line 1</name> </param> <param type="1" visible="False"> <name>Invisible Line 2</name> </param> <param type="2" visible="False"> <name>Show Invisible Header</name> <value>False</value> </param> </header> <header visible="False" expanded="True"> <name>Invisible Header</name> <param type="1" visible="True"> <name>No value</name> </param> </header> </contents> <style> <header UpdateStyle="False"> <backColor>#DBDFFF</backColor> <bold>True</bold> <highlightcolor>#3399FF</highlightcolor> <italic>False</italic> <textalign>0</textalign> <textcolor>#000000</textcolor> <textfont>System</textfont> <texthighlightcolor>#FFFFFF</texthighlightcolor> <textsize>0</textsize> <underline>False</underline> </header> <name UpdateStyle="False"> <backColor>#FFFFFF</backColor> <bold>False</bold> <highlightcolor>#3399FF</highlightcolor> <italic>False</italic> <textalign>2</textalign> <textcolor>#000000</textcolor> <textfont>System</textfont> <texthighlightcolor>#FFFFFF</texthighlightcolor> <textsize>0</textsize> <underline>False</underline> </name> <value UpdateStyle="False"> <backColor>#FFFFFF</backColor> <bold>False</bold> <highlightcolor>#3399FF</highlightcolor> <italic>False</italic> <textalign>0</textalign> <textcolor>#000000</textcolor> <textfont>System</textfont> <texthighlightcolor>#FFFFFF</texthighlightcolor> <textsize>0</textsize> <underline>False</underline> </value> <ColonString>:</ColonString> <PropertyString>Property</PropertyString> <ValueString>Value</ValueString> <TransparentString>transparent</TransparentString> <Border>True</Border> <ColumnWidths>50% 50%, 1*</ColumnWidths> <GridLinesHorizontal>0</GridLinesHorizontal> <GridLinesVertical>0</GridLinesVertical> <HasHeading>True</HasHeading> <ScrollBarHorizontal>False</ScrollBarHorizontal> <ScrollBarVertical>True</ScrollBarVertical> <DefaultRowHeight>-1</DefaultRowHeight> <AutoHideScrollbars>True</AutoHideScrollbars> <Hierarchical>True</Hierarchical> </style> </PropertyListBox>
History
Version 1.6.0 - Not released
- New:
- ChangeSize function, to increase or decrease text size.
- LoadFromRecordSet, Load data from a RecordSet.
Version 1.5.1 - Released December 28, 2012
- Fix:
- Compilation problem
Version 1.5.0 - Released November 24, 2012
- New:
- TypeNumericUpDown constant
Display a numeric value with up/down arrows
- Fix:
- PopupArrow missing the tip pixel in newer versions of RealStudio
- NilObjectException if the focus is lost when opening the window containing the PropertyListBox
- Caption in buttons for Windows HiDPI screens
Version 1.4.0 - Released December 27, 2011
- New Properties :
- ColorGutter for coloring the gutter (left part of the listbox) with the Headerbackground color
- CustomGridLinesVertical
- CustomGridLinesHorizontal
- CustomGridLinesColor
Custom Grid Lines in order to change the color of the grid lines. Only ThinSolid style is supported for the moment
Version 1.3 - Released December 27, 2011
- Fix:
- UnsupportedFormatException in RealStudio 2011r3 and 2011r4
Version 1.2.1
- Fix:
- OutOfBoundsException in PropertyListbox.CellValue
Version 1.2 - Released
- New property for Lines:
- Comment
Store any information you want in the Comment
- New Line type:
- TypePicture
Selects a FolderItem and opens it as a picture.
- New Event:
- CellColorClick
Fires when the select color button in TypeColor cells is clicked. Return True if you handle the color selection (by displaying your own colorwheel for example)
Version 1.1 - Released February 03, 2009
- New property for Editable lines: Numeric As Boolean and ColorNegative As Boolean
If Numeric is True, when the Editable cell looses the focus, the Value is evaluated as a maths function If ColorNegative is True and the value is smaller than 0, the text will be red
- New property for all lines (including Header): Caption As String
Enables to have a global name for a line and a different caption than the name. This is very useful for multi-language apps When loading an XML definition, if the caption isn't defined, the name value is copied in the caption value.
- New button for TypeColor cells
- List can now be hierarchical
- New Event: CellClick
Fires when a cell is clicked before doing anything else (editing cell, pressing button, opening window, ...)
- New property for FolderItem lines: Folder As Boolean
If Folder is true, then the cell will fire SelectFolder instead of GetOpenFolderItem
- New Function in PropertyListLine: ParentName() As String
Returns the Name of the Line's Parent if it has a Parent (Header)
- Fix:
- Cellvalue now returns a color if the cell of TypeColor (It used to return the string value of the color)
- LimitText in RB 2009r5 doesn't bring up an error anymore
- FolderItem type opens the Dialog window in the current FolderItem path
- Autocomplete window now displays on the correct screen if using multiple screens.
Version 1.0 - First Public Release
Note
If you get an Unhandled exception or no data when loading an XML definition, add this line of code: Return Array("")
In the Event LoadingValueList
See Also
BBCodeStorage, PropertyListButton, PropertyListLine, PropertyListStyle classes. PropertyListModule module. Listbox control.