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

FwListBox is a simulation of a regular Windows.Forms.ListBox. It has much the same interface, though not all events and properties are yet supported. There are two main differences: (1) It is implemented using FieldWorks Views, and hence can render Graphite fonts properly. (2) Item labels can be TsStrings, in which case, formatting of items can vary based on the properties of string runs. To get this behavior, you can (a) Let the items actually be ITsStrings. (b) Let the items implement the SIL.FieldWorks.FDO.ITssValue interface, which has just one property, public ITsString AsTss {get;} You must also pass your writing system factory to the FwListBox (set the WritingSystemFactory property). Otherwise, the combo box will not be able to interpret the writing systems of any TsStrings it is asked to display. It will improve performance to do this even if you are not using TsString data.
상속: System.Windows.Forms.Panel, IFWDisposable, IVwNotifyChange
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_highlightedIndex int
m_selectedIndex int

Private Properties

프로퍼티 타입 설명
EnsureRoot void
FwListBox System
GetItem object
RaiseSameItemSelected void
RaiseSelectedIndexChanged void
SetItem void

공개 메소드들

메소드 설명
BeginUpdate ( ) : void

Begins the update.

CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

EndUpdate ( ) : void

Ends the update.

FindStringExact ( string str ) : int

Find the index where the specified string occurs. If it does not, or the argument is null, return -1.

FocusAndCapture ( ) : void

Move the focus to the real view. (Used to capture the mouse also, but that interferes with the scroll bar, so I'm using a filter instead.)

PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void

Receives notifications when something in the data cache changes.

ScrollHighlightIntoView ( ) : void

Scroll so that the selection can be seen.

TextOfItem ( object item ) : ITsString

Obtain the text corresponding to the specified item in your contents list.

보호된 메소드들

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

Clean up any resources being used.

FindIndexOfTss ( ITsString tss ) : int

Find the index where the specified TsString occurs. If it does not, or the argument is null, return -1.

IsHighlighted ( int index ) : bool

IsSelected ( int index ) : bool

Answer whether the indicated index is selected. This is trivial now, but will be less so if we implement multiple selections.

비공개 메소드들

메소드 설명
EnsureRoot ( ) : void

Ensure the root box has been created.

FwListBox ( ) : System
GetItem ( int itemIndex ) : object

Gets the item.

RaiseSameItemSelected ( ) : void

Fire the SameItemSelected event.

RaiseSelectedIndexChanged ( ) : void

Fire the SelectedIndexChanged event.

SetItem ( object item, int &itemIndex ) : void

Sets the item.

메소드 상세

BeginUpdate() 공개 메소드

Begins the update.
public BeginUpdate ( ) : void
리턴 void

CheckDisposed() 공개 메소드

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
리턴 void

Dispose() 보호된 메소드

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

EndUpdate() 공개 메소드

Ends the update.
public EndUpdate ( ) : void
리턴 void

FindIndexOfTss() 보호된 메소드

Find the index where the specified TsString occurs. If it does not, or the argument is null, return -1.
protected FindIndexOfTss ( ITsString tss ) : int
tss ITsString
리턴 int

FindStringExact() 공개 메소드

Find the index where the specified string occurs. If it does not, or the argument is null, return -1.
public FindStringExact ( string str ) : int
str string
리턴 int

FocusAndCapture() 공개 메소드

Move the focus to the real view. (Used to capture the mouse also, but that interferes with the scroll bar, so I'm using a filter instead.)
public FocusAndCapture ( ) : void
리턴 void

IsHighlighted() 보호된 메소드

protected IsHighlighted ( int index ) : bool
index int
리턴 bool

IsSelected() 보호된 메소드

Answer whether the indicated index is selected. This is trivial now, but will be less so if we implement multiple selections.
protected IsSelected ( int index ) : bool
index int
리턴 bool

PropChanged() 공개 메소드

Receives notifications when something in the data cache changes.
public PropChanged ( int hvo, int tag, int ivMin, int cvIns, int cvDel ) : void
hvo int
tag int
ivMin int
cvIns int
cvDel int
리턴 void

ScrollHighlightIntoView() 공개 메소드

Scroll so that the selection can be seen.
public ScrollHighlightIntoView ( ) : void
리턴 void

TextOfItem() 공개 메소드

Obtain the text corresponding to the specified item in your contents list.
public TextOfItem ( object item ) : ITsString
item object
리턴 ITsString

프로퍼티 상세

m_highlightedIndex 보호되어 있는 프로퍼티

The index highlighted, may be different from selected during tracking in combo. This is set true in a combo box, when we want to track mouse movement by highlighting the item hovered over. When it is true, changing the selected index does not trigger events, but a MouseDown does.
protected int m_highlightedIndex
리턴 int

m_selectedIndex 보호되어 있는 프로퍼티

The index actually selected.
protected int m_selectedIndex
리턴 int