1. Re: 2 Win Combo contol behavior

Minor update to have keyed entry and selection
show txt in the status bar

**Begin**

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)
  if index = 0 then
     setText(status, getText(combo))
  else
     setText(status, combo_txt[index])
  end if
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**

euman at bellsouth.net

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu