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

FwComboBox is a simulation of a regular Windows.Forms.ComboBox. 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 FwComboBox (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.
상속: FwComboBoxBase, IComboList
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

Private Properties

프로퍼티 타입 설명
m_button_KeyPress void
m_comboTextBox_KeyPress void
m_listBox_SameItemSelected void
m_listBox_SelectedIndexChanged void

공개 메소드들

메소드 설명
AddItem ( ITsString tss ) : void

Add items to the FWComboBox but adjust the string so it matches the Font size.

FindStringExact ( ITsString tss ) : int

Find the index where exactly this string occurs in the list, or -1 if it does not.

FindStringExact ( string str ) : int

Find the index where exactly this string occurs in the list, or -1 if it does not.

FwComboBox ( ) : System

Construct one.

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

SetTssWithoutChangingSelectedIndex ( ITsString tss ) : void

This is used (e.g., in filter bar) when the text we want to show in the combo is something different from the text of the selected item.

보호된 메소드들

메소드 설명
CreateDropDownBox ( ) : IDropDownBox

Creates the drop down box.

Dispose ( bool disposing ) : void

Clean up any resources being used.

RaiseSelectedIndexChanged ( ) : void

Fire the SelectedIndexChanged event.

비공개 메소드들

메소드 설명
m_button_KeyPress ( object sender, KeyPressEventArgs e ) : void

Handle a key press in the combo box. If it is a dropdown list use typing to try to make a selection (cf. LT-2190).

m_comboTextBox_KeyPress ( object sender, KeyPressEventArgs e ) : void

Handle a key press in the combo box. If it is a dropdown list use typing to try to make a selection (cf. LT-2190).

m_listBox_SameItemSelected ( object sender, EventArgs e ) : void
m_listBox_SelectedIndexChanged ( object sender, EventArgs e ) : void

메소드 상세

AddItem() 공개 메소드

Add items to the FWComboBox but adjust the string so it matches the Font size.
public AddItem ( ITsString tss ) : void
tss ITsString
리턴 void

CreateDropDownBox() 보호된 메소드

Creates the drop down box.
protected CreateDropDownBox ( ) : IDropDownBox
리턴 IDropDownBox

Dispose() 보호된 메소드

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

FindStringExact() 공개 메소드

Find the index where exactly this string occurs in the list, or -1 if it does not.
public FindStringExact ( ITsString tss ) : int
tss ITsString
리턴 int

FindStringExact() 공개 메소드

Find the index where exactly this string occurs in the list, or -1 if it does not.
public FindStringExact ( string str ) : int
str string
리턴 int

FwComboBox() 공개 메소드

Construct one.
public FwComboBox ( ) : System
리턴 System

PropChanged() 공개 메소드

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

RaiseSelectedIndexChanged() 보호된 메소드

Fire the SelectedIndexChanged event.
protected RaiseSelectedIndexChanged ( ) : void
리턴 void

SetTssWithoutChangingSelectedIndex() 공개 메소드

This is used (e.g., in filter bar) when the text we want to show in the combo is something different from the text of the selected item.
public SetTssWithoutChangingSelectedIndex ( ITsString tss ) : void
tss ITsString
리턴 void