Re: Win - Combo control behavior

new topic     » goto parent     » topic index » view thread      » older message » newer message

Here's the answer to your Question

**Begin Code**

include win32lib.ew

constant
  win = create(Window, "", 0, Default, Default, 200, 200, 0),
  combo = create(Combo, "", win, 10, 10, 120, 80, 0),
  status = create(StatusBar, "", win, 0, 0, 0, 0, 0)

sequence combo_txt
integer index

combo_txt = {"micro","snort","is","evil"}

procedure onChange_combo()
  index = getIndex(combo)
  setText(status, combo_txt[index])
end procedure

for add_txt = 1 to length(combo_txt) do
    addItem(combo, combo_txt[add_txt])
end for

onChange[combo] = routine_id("onChange_combo")

WinMain(win, Normal)

**End Code**

euman at bellsouth.net

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu