C# 클래스 SIL.FieldWorks.Common.Widgets.ComboListBox

A "Combo" list box is one that can launch itself as a stand-alone, yet modal window, like the drop-down list in a Combo. It can also be used for other drop-down lists, for example, from an icon button. It is displayed using the Launch method. It is automatically hidden if the user clicks outside it (and the click is absorbed in the process). The item the user is hovering over is highlighted.
상속: FwListBox, IComboList, IDropDownBox
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
ComboListBox System
FindAndHighlightItemStartingWith bool
SetWindowLong int
SetWindowPos bool
ShowInactiveTopmost void
ShowWindow bool
m_ListForm_Deactivate void

공개 메소드들

메소드 설명
AdjustSize ( int maxWidth, int maxHeight ) : void

Adjust the size of the list box, so it is just large enough to show all items, or at most the size specified by the arguments (or at least 100x10).

HideForm ( ) : void

Hide the containing form (and thus the list box as a whole).

HighlightItemStartingWith ( string start ) : void

Cycle the selection to the next item that begins with the specified text. (Case insensitive. Trims whitespace in list items.)

Launch ( Rectangle launcherBounds, Rectangle screenBounds ) : void

Launch the ComboListBox. Typical usage, where 'this' is a control that the list should appear below: m_listBox.Launch(Parent.RectangleToScreen(Bounds), Screen.GetWorkingArea(this)); Or, where rect is a rectangle in the client area of control 'this': m_listBox.Launch(RectangleToScreen(rect), Screen.GetWorkingArea(this); (Be sure to set the height and width of the ComboListBox first.)

OnCapturedClick ( ) : void

This is called when the embedded InnerFwListBox detects a click outside its bounds, which happens only when it has been told to capture the mouse. ComboListBox overrides this to close the list box.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

OnLostFocus ( EventArgs e ) : void

If a combo list box loses focus, hide it.

비공개 메소드들

메소드 설명
ComboListBox ( ) : System
FindAndHighlightItemStartingWith ( int iStarting, int iEnding, string startKey ) : bool

Highlight the item whose text starts with the given startKey string (if item exists).

SetWindowLong ( IntPtr hWnd, int nIndex, int dwNewLong ) : int
SetWindowPos ( int hWnd, int hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags ) : bool
ShowInactiveTopmost ( Form owner, Form frm ) : void
ShowWindow ( IntPtr hWnd, int nCmdShow ) : bool
m_ListForm_Deactivate ( object sender, EventArgs e ) : void

메소드 상세

AdjustSize() 공개 메소드

Adjust the size of the list box, so it is just large enough to show all items, or at most the size specified by the arguments (or at least 100x10).
public AdjustSize ( int maxWidth, int maxHeight ) : void
maxWidth int
maxHeight int
리턴 void

Dispose() 보호된 메소드

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

HideForm() 공개 메소드

Hide the containing form (and thus the list box as a whole).
public HideForm ( ) : void
리턴 void

HighlightItemStartingWith() 공개 메소드

Cycle the selection to the next item that begins with the specified text. (Case insensitive. Trims whitespace in list items.)
public HighlightItemStartingWith ( string start ) : void
start string the search key
리턴 void

Launch() 공개 메소드

Launch the ComboListBox. Typical usage, where 'this' is a control that the list should appear below: m_listBox.Launch(Parent.RectangleToScreen(Bounds), Screen.GetWorkingArea(this)); Or, where rect is a rectangle in the client area of control 'this': m_listBox.Launch(RectangleToScreen(rect), Screen.GetWorkingArea(this); (Be sure to set the height and width of the ComboListBox first.)
public Launch ( Rectangle launcherBounds, Rectangle screenBounds ) : void
launcherBounds System.Drawing.Rectangle A rectangle in 'screen' coordinates indicating where to display the list. Typically, as shown /// above, the location of something the user clicked to make the list display. It's significance is that /// the list will usually be shown with its top left just to the right of the bottom left of the rectangle, and /// (if the list width has not already been set explicitly) its width will match the rectangle. If there is not /// room to displya the list below this rectangle, it will be displayed above instead.
screenBounds System.Drawing.Rectangle A rectangle in 'screen' coordinates indicating the location of the actual screen /// that the list is to appear on.
리턴 void

OnCapturedClick() 공개 메소드

This is called when the embedded InnerFwListBox detects a click outside its bounds, which happens only when it has been told to capture the mouse. ComboListBox overrides this to close the list box.
public OnCapturedClick ( ) : void
리턴 void

OnLostFocus() 보호된 메소드

If a combo list box loses focus, hide it.
protected OnLostFocus ( EventArgs e ) : void
e System.EventArgs
리턴 void