DeleteComboBoxItem

Gadget ›› ComboBoxGadget ››
Parent Previous Next

DeleteComboBoxItem

Синтаксис

sub DeleteComboBoxItem(ByVal gadget As long, ByVal iPos As long)

Описание

Удаляет ненужный пункт из ComboBoxGadget

Параметры

gadget - номер гаджета

iPos - пункт для удаления

Платформы

Windows , Linux

Пример

#Include "window9.bi"
#ifdef __FB_WIN32__
dim as Long w = 80
#else
dim as Long w = 30
#endif
OpenWindow("",10,10,400,150)
ComboBoxGadget(1,10,10,100,w)
AddComboBoxItem(1,"Пункт0",-1)
AddComboBoxItem(1,"Пункт1",-1)
AddComboBoxItem(1,"Пункт2",-1)
ButtonGadget(2,150,10,220,25,"Удалить пункт 0")
Do
var event=WaitEvent()
If event=eventclose Then End
If event=eventgadget Then
 If eventnumber()=2 Then
  DeleteComboBoxItem(1,0)
 EndIf
EndIf
Loop

Результат

Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents