FGX.ComboBox.TfgCustomComboBox: различия между версиями

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску
(summary)
(summary)
Строка 10: Строка 10:
 
Прямые наследники:
 
Прямые наследники:
 
[[FGX.ComboBox.TfgComboBox|TfgComboBox]]
 
[[FGX.ComboBox.TfgComboBox|TfgComboBox]]
 
== Описание ==
 
 
<span style="color:gray">Описание отсутствует.</span>
 
 
== Конструкторы ==
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">constructor</syntaxhighlight> || <code>Create(AOwner: [[TComponent]])</code>
 
<span style="color:gray">Описание отсутствует.</span>
 
|}
 
 
== Методы ==
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">AddItem(const AItem: [[FGX.ComboBox.TfgCustomComboBoxItem|TfgCustomComboBoxItem]])</code>
 
<p>Добавляет произвольный элемент комбобокса.</p>
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">AddTextItem(const AText: [[string]]): [[FGX.ComboBox.TfgComboBoxTextItem|TfgComboBoxTextItem]]</code>
 
<p>Добавляет текстовый элемент комбобокса. Он отображает только текст.</p>
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">DeleteItem(const AItem: [[FGX.ComboBox.TfgCustomComboBoxItem|TfgCustomComboBoxItem]]): [[Boolean]]</code>
 
 
<p>Удаляет элемент по указанному инстансу <i>AItem</i> .</p><div class="info">Не допускается указывать nil. Если элемент был найден среди элементов контрола и удален, то вернет True, в противном случае - False.</div>
 
|-
 
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">DeleteItem(const AIndex: [[Integer]]): [[Boolean]]</code>
 
 
<p>Удаляет элемент по указанному индексу <i>AIndex</i> .</p><div class="info">Не допускается указывать индекс не существующего элемента страницы.</div>
 
|-
 
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">Clear()</code>
 
<p>Удаляет все элементы выпадающего списка.</p>
 
|}
 
 
== Свойства ==
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>ActiveItem: [[FGX.ComboBox.TfgCustomComboBoxItem|TfgCustomComboBoxItem]]</code>
 
 
<p>Активный/выбранный элмент ( <i>ItemIndex</i> ).</p><div class="info">Если ни один элемент не выбран, то вернет nil.</div>
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Items[Index]: [[FGX.ComboBox.TfgCustomComboBoxItem|TfgCustomComboBoxItem]]</code>
 
 
<p>Возвращает элемент по указанному индексу.</p><div class="info">Не допускается указывать индекс не существующего элемента.</div>
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>ItemsCount: [[Integer]]</code>
 
<p>Количество элементов списка.</p>
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Text: [[string]]</code>
 
 
<p>Возвращает текст текущего элемента, если элемент поддерживает текст (IFGXTextSupported).</p><div class="info">Если текущего элемента нет или он не поддерживает текст, то вернет пустую строку.</div>
 
|-
 
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>ItemIndex: [[Integer]]</code>
 
<p>Индекс выбранного элемента выпадающего списка.</p>
 
|}
 
 
== События ==
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">event</syntaxhighlight> || <code>OnChanged: [[TNotifyEvent]]</code>
 
<p>Срабатывает, когда пользователь выбрал другой элемент списка.</p>
 
|-
 
| <syntaxhighlight lang="Delphi">event</syntaxhighlight> || <code>OnItemSelected: [[TfgOnItemSelected]]</code>
 
<p>Срабатывает, когда пользователь выбрал другой элемент списка. Дополнительно передает индекс выбранного элемента и сам экземпляр элемента.</p>
 
|}
 
 
== Константы ==
 
 
{| class="wikitable sortable"
 
|-
 
| <syntaxhighlight lang="Delphi">const</syntaxhighlight> || <code>UndefinedItemIndex: [[Integer]]</code>
 
<span style="color:gray">Описание отсутствует.</span>
 
|}
 

Версия 18:03, 29 июня 2019

Delphi

TfgCustomComboBox = class (TfgControl, IFGXContainer)

TComponent -> TfgControl -> TfgCustomComboBox

Прямые наследники: TfgComboBox