Class PropertyPage
- Namespace
- CADability.Forms
- Assembly
- CADability.Forms.dll
public class PropertyPage : ScrollableControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IPropertyPage
- Inheritance
-
PropertyPage
- Implements
- Inherited Members
Constructors
PropertyPage(string, int, PropertiesExplorer)
public PropertyPage(string titleId, int iconId, PropertiesExplorer propExplorer)
Parameters
titleIdstringiconIdintpropExplorerPropertiesExplorer
Properties
ActiveView
The active view of the frame. Kept for the older entries, use ActiveView instead.
public IView ActiveView { get; }
Property Value
Frame
The frame the page belongs to (the frame of its control center). Entries use it to reach the project, the active view and the UI services.
public IFrame Frame { get; set; }
Property Value
IconId
public int IconId { get; }
Property Value
TitleId
public string TitleId { get; }
Property Value
Methods
Add(IPropertyEntry, bool)
Appends a root entry to the page and selects it. The entry gets Added(IPropertyPage), and its Parent is set to the page.
public void Add(IPropertyEntry toAdd, bool showOpen)
Parameters
toAddIPropertyEntrythe entry to add
showOpenbooltrue: also open the entry so that its sub entries are shown
Clear()
Removes all entries from the page.
public void Clear()
ContainsEntry(IPropertyEntry)
Tells whether the entry is currently displayed on this page, as a root entry or as a sub entry of an open entry.
public bool ContainsEntry(IPropertyEntry toTest)
Parameters
toTestIPropertyEntry
Returns
- bool
true when the entry is displayed on this page
Dispose(bool)
protected override void Dispose(bool disposing)
Parameters
disposingbool
FindFromHelpLink(string, bool)
Finds an entry by its ResourceId (or, for an entry without resource id, by its
label). The displayed entries are searched first; with searchTreeAndOpen the sub entries
of closed entries are searched as well (FindSubItem(string)). Despite the name the
found entry is not opened or selected.
public IPropertyEntry FindFromHelpLink(string helpResourceID, bool searchTreeAndOpen)
Parameters
helpResourceIDstringthe resource id (or label text) of the entry
searchTreeAndOpenbooltrue: also search entries that are not displayed because their parent is closed
Returns
- IPropertyEntry
the entry, or null when there is none
GetCurrentSelection()
Returns the selected entry of the page, the same as Selected.
public IPropertyEntry GetCurrentSelection()
Returns
- IPropertyEntry
the selected entry, or null when none is selected
GetFrame()
Returns the frame the page belongs to. Kept for the older entries, use Frame instead.
public IFrame GetFrame()
Returns
- IFrame
the frame
GetParent(IShowProperty)
Returns the parent entry of the given entry. Kept for the older entries, use Parent instead.
public IPropertyEntry GetParent(IShowProperty child)
Parameters
childIShowPropertythe entry whose parent is wanted
Returns
- IPropertyEntry
the parent entry, or null for a root entry (whose parent is the page)
IsOnTop()
Tells whether this page is the active page of the control center, i.e. the one whose tab is selected and which the user sees.
public bool IsOnTop()
Returns
- bool
true when this page is in front
IsOpen(IShowProperty)
Tells whether the sub entries of the entry are shown. Kept for the older entries, use IsOpen instead.
public bool IsOpen(IShowProperty toTest)
Parameters
toTestIShowPropertythe entry to test
Returns
- bool
true when the entry is open
LabelChanged(int)
public void LabelChanged(int index)
Parameters
indexint
MakeVisible(IPropertyEntry)
Scrolls the page so that the entry is in view. The entry must be displayed, i.e. its parents must be open.
public void MakeVisible(IPropertyEntry toShow)
Parameters
toShowIPropertyEntrythe entry to scroll to
OnMouseClick(MouseEventArgs)
protected override void OnMouseClick(MouseEventArgs e)
Parameters
OnMouseDoubleClick(MouseEventArgs)
protected override void OnMouseDoubleClick(MouseEventArgs e)
Parameters
OnMouseDown(MouseEventArgs)
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseMove(MouseEventArgs)
protected override void OnMouseMove(MouseEventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
protected override void OnMouseUp(MouseEventArgs e)
Parameters
OnPaint(PaintEventArgs)
protected override void OnPaint(PaintEventArgs e)
Parameters
OnSizeChanged(EventArgs)
protected override void OnSizeChanged(EventArgs e)
Parameters
OpenSubEntries(IPropertyEntry, bool)
Opens or closes the entry, i.e. shows or hides its sub entries. Opening an entry that is already open rebuilds its sub entries, which serves as a refresh after the sub entries changed.
public void OpenSubEntries(IPropertyEntry toOpenOrClose, bool open)
Parameters
toOpenOrCloseIPropertyEntrythe entry, it must be displayed on the page
openbooltrue: show the sub entries, false: hide them
Refresh(IPropertyEntry)
Redraws the entry after its label, value or flags changed. When the entry is open, its sub entries are collected again, so a changed SubItems array is reflected as well. When the entry is being edited, the text box is updated with its new Value.
public void Refresh(IPropertyEntry toRefresh)
Parameters
toRefreshIPropertyEntrythe entry to redisplay
Refresh(int)
public void Refresh(int index)
Parameters
indexint
Remove(IPropertyEntry)
Removes a root entry (one that was added with Add(IPropertyEntry, bool)) from the page. An edit in progress is ended first; the entry and its displayed sub entries get Removed(IPropertyPage).
public void Remove(IPropertyEntry toRemove)
Parameters
toRemoveIPropertyEntrythe root entry to remove
SelectEntry(IPropertyEntry)
Selects the entry, the same as setting Selected; null is ignored. The page is not brought to the front.
public void SelectEntry(IPropertyEntry toSelect)
Parameters
toSelectIPropertyEntrythe entry to select, it must be displayed on the page
StartEditLabel(IPropertyEntry)
Opens the text box on the label of the entry, e.g. to let the user name a newly created item. The entry gets StartEdit(bool) with false and, when the edit ends, EndEdit(bool, bool, string).
public void StartEditLabel(IPropertyEntry ToEdit)
Parameters
ToEditIPropertyEntrythe entry whose label is edited, it must be displayed on the page
ValueChanged(int)
public void ValueChanged(int index)
Parameters
indexint
Events
OnPreProcessKeyDown
Raised for a key pressed while this page is active which neither the action nor the control center handled (see PreProcessKeyDown). An entry may subscribe to react to keys while it is displayed.
public event PreProcessKeyDown OnPreProcessKeyDown
Event Type
OnSelectionChanged
Raised after the selected entry of the page changed; the handler gets the previously and the newly selected entry, either of which may be null (see SelectionChanged).
public event SelectionChanged OnSelectionChanged