Interface IPropertyEntry
- Namespace
- CADability.UserInterface
- Assembly
- CADability.dll
Describes a single line in a tab page in the control center. Must be implemented by displayable properties like GeoPointProperty.
public interface IPropertyEntry
Properties
ContextMenu
Gets a ContextMenue for this entry
MenuWithHandler[] ContextMenu { get; }
Property Value
DeferUpdate
Only meaningful when ValueEditable is set. In this case the changes by typing do not notify the system until the text-box is closed (i.e. the focus leaves the text box)
bool DeferUpdate { get; set; }
Property Value
Flags
Gets the type of this entry
PropertyEntryType Flags { get; }
Property Value
IndentLevel
The indentation of this entry (according to it's position int the property tree). The implementer must simply keep this value
int IndentLevel { get; set; }
Property Value
Index
The line number of this entry in the property page. The implementer must simply keep this value
int Index { get; set; }
Property Value
IsLocked
Is the lockable entry is currently locked
bool IsLocked { get; set; }
Property Value
IsOpen
Is the entry currently displayed with its sub-entries?
bool IsOpen { get; set; }
Property Value
Label
The label text
string Label { get; }
Property Value
Parent
Gets or sets the parent. The implementer must simply keep this reference, it is either a IPropertyEntry or a IPropertyPage for the root objects
object Parent { get; set; }
Property Value
ReadOnly
Only meaningful when ValueEditable is set. If read-only is true, the value cannot be edited.
bool ReadOnly { get; set; }
Property Value
ResourceId
A tool-tip, or null if no tool-tip should be displayed
string ResourceId { get; }
Property Value
SubItems
Returns the sub-items, will only be called when HasSubEntries is set.
IPropertyEntry[] SubItems { get; }
Property Value
Value
The values text (may contain drawing hints like "[[ColorBox:0:128:255]]Pink")
string Value { get; }
Property Value
Methods
Added(IPropertyPage)
Has been added to the property page, can be used to do some initialization.
void Added(IPropertyPage pp)
Parameters
ppIPropertyPageproperty page, it has been added to, keep it to use it for Refresh notification
ButtonClicked(PropertyEntryButton)
Notification that the user clicked one of the buttons of the entry (see PropertyEntryButton): the context menu or drop down button, ok or cancel of an edit, the check box, the lock symbol or the direct menu arrow, or double clicked the value.
void ButtonClicked(PropertyEntryButton button)
Parameters
buttonPropertyEntryButtonthe button that was clicked
EditTextChanged(string)
The text being edited has changed
bool EditTextChanged(string newValue)
Parameters
newValuestringThe new text
Returns
- bool
true, when the property would accept this value
EndEdit(bool, bool, string)
Notification when the editing process is being terminated.
void EndEdit(bool aborted, bool modified, string newValue)
Parameters
abortedbooltrue: the edit has been aborted, false: normal end of edit process
modifiedbooltrue: the text has been modified while editing, false: the text is unchanged
newValuestringthe text as it was when editing ended
FindSubItem(string)
Finds this entry or one of its sub entries (recursively, whether they are open or not) by its
ResourceId; an entry without a resource id matches when its Label equals
helpResourceID.
IPropertyEntry FindSubItem(string helpResourceID)
Parameters
helpResourceIDstringthe resource id (or label text) to look for
Returns
- IPropertyEntry
the entry found, or null
GetDropDownList()
Gets the list of choices (may contain drawing hints, like background color)
string[] GetDropDownList()
Returns
- string[]
GetErrorText()
Will be called when EditTextChanged(string) returned false. You can provide an error message, which is displayed when the mouse hovers over the error symbol.
string GetErrorText()
Returns
ListBoxSelected(int)
The indicated selectedIndex has been selected in the listbox
void ListBoxSelected(int selectedIndex)
Parameters
selectedIndexint
OpenOrCloseSubEntries()
if sub-entries are show, then hide them, if not, then show them (user clicked on the + or - symbol for opening or closing the sub-entries)
int OpenOrCloseSubEntries()
Returns
Opened(bool)
Notification for the entry that the open/closed state has changed
void Opened(bool isOpen)
Parameters
isOpenbooltrue: is now open (sub-entries are shown), false: is closed (sub-entries are hidden)
Removed(IPropertyPage)
Has been removed from the property page
void Removed(IPropertyPage pp)
Parameters
Select()
Select this entry
void Select()
Selected(IPropertyEntry)
This item is now selected in the property page. The item previousSelected was selected before (may be null).
void Selected(IPropertyEntry previousSelected)
Parameters
previousSelectedIPropertyEntrythe entry that was selected before, may be null
StartEdit(bool)
Notification that the label or value part is being edited. Will only be called when Flags contains ValueEditable or LabelEditable.
void StartEdit(bool editValue)
Parameters
editValuebooltrue: editing the value part, false: editing the label part
UnSelected(IPropertyEntry)
This item was selected in the property page but is no more selected. The item nowSelected will be selected instead (may be null).
void UnSelected(IPropertyEntry nowSelected)
Parameters
nowSelectedIPropertyEntrythe entry that will be selected instead, may be null
Events
PropertyEntryChangedStateEvent
Raised when the state of the entry changes: it was added to or removed from a property page, selected or unselected, opened or closed, or an edit of its value ended. The argument tells which (see StateChangedArgs.State). The owner of an entry uses it e.g. to show feedback in the view while the entry is selected.
event PropertyEntryChangedStateDelegate PropertyEntryChangedStateEvent