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
Показать файл Открыть проект Примеры использования класса

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