Re: [WIN]Win32Lib: v50 : trap click in SIMPLE combo?
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Dec 01, 2000
- 496 views
Derek, *Very* nearly! It works with "Combo" style, only problem is, I'm trying to use either a SimpleCombo, or in it's cousin as it's been defined in 54.5, Combo with styles or_all({WS_VSCROLL, WS_CHILD,WS_VISIBLE,CBS_DROPDOWNLIST,CBS_HASSTRINGS,WS_TABSTOP }), and apparently the dropdownlist creating the "static text control" either isn't trapped by onEvent, or isn't sent to "WM_PARENTNOTIFY"?? However, that IS a good example to include with "onEvent" in the Win32LIb doc! :) Dan ----- Original Message ----- From: "Derek Parnell" <dparnell at BIGPOND.NET.AU> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Friday, December 01, 2000 4:53 AM Subject: Re: [WIN]Win32Lib: v50 : trap click in SIMPLE combo? > Dan, > try the following code to see if if might suit... > -------------------------- > include win32lib.ew > integer w,c,s > > w = create(Window, "Test", 0, 0, 0, 500, 400,0) > s = create(StatusBar, "", w, 0, 0, 0, 0, 0) > c = create(Combo, "", w, 5, 5, 300, 100, 0) > > > procedure ee(atom msg, atom wparam, atom lparam) > > sequence t > > if msg = WM_PARENTNOTIFY then > if wparam = WM_LBUTTONDOWN then > t = "Left" > elsif wparam = WM_RBUTTONDOWN then > t = "Right" > else > t = sprintf("%d", wparam) > end if > setText(s, t) > end if > end procedure > onEvent[c] = routine_id("ee") > > addItem(c, "One") > addItem(c, "Two") > > WinMain(w, 0) > ---- > Derek