Table of Contents

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

MenuWithHandler[]

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

bool

Flags

Gets the type of this entry

PropertyEntryType Flags { get; }

Property Value

PropertyEntryType

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

int

Index

The line number of this entry in the property page. The implementer must simply keep this value

int Index { get; set; }

Property Value

int

IsLocked

Is the lockable entry is currently locked

bool IsLocked { get; set; }

Property Value

bool

IsOpen

Is the entry currently displayed with its sub-entries?

bool IsOpen { get; set; }

Property Value

bool

Label

The label text

string Label { get; }

Property Value

string

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

object

ReadOnly

Only meaningful when ValueEditable is set. If read-only is true, the value cannot be edited.

bool ReadOnly { get; set; }

Property Value

bool

ResourceId

A tool-tip, or null if no tool-tip should be displayed

string ResourceId { get; }

Property Value

string

SubItems

Returns the sub-items, will only be called when HasSubEntries is set.

IPropertyEntry[] SubItems { get; }

Property Value

IPropertyEntry[]

Value

The values text (may contain drawing hints like "[[ColorBox:0:128:255]]Pink")

string Value { get; }

Property Value

string

Methods

Added(IPropertyPage)

Has been added to the property page, can be used to do some initialization.

void Added(IPropertyPage pp)

Parameters

pp IPropertyPage

property 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

button PropertyEntryButton

the button that was clicked

EditTextChanged(string)

The text being edited has changed

bool EditTextChanged(string newValue)

Parameters

newValue string

The 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

aborted bool

true: the edit has been aborted, false: normal end of edit process

modified bool

true: the text has been modified while editing, false: the text is unchanged

newValue string

the 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

helpResourceID string

the 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

string

ListBoxSelected(int)

The indicated selectedIndex has been selected in the listbox

void ListBoxSelected(int selectedIndex)

Parameters

selectedIndex int

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

int

Opened(bool)

Notification for the entry that the open/closed state has changed

void Opened(bool isOpen)

Parameters

isOpen bool

true: 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

pp IPropertyPage

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

previousSelected IPropertyEntry

the 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

editValue bool

true: 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

nowSelected IPropertyEntry

the 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

Event Type

PropertyEntryChangedStateDelegate