1. list problem
- Posted by George Walters <gwalters at sc.rr.com> Jun 06, 2002
- 479 views
I have created a list of things "create (List, .......) " and would like to display detail info about the item highlighted in the status bar. The only way I know to do this is to trap arrow keys, pageup, pagedown home, end and mouse click so I know that an item was highlighted. My problem is windows selects the item AFTER i have done a getItem, so I am one behind. I have set returnValue(-1) but it doesen't help. Does anyone know how I can detect which item is selected w/o having to trap all the keys..... or otherwise shed some light on the problem? george
2. Re: list problem
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jun 06, 2002
- 453 views
George, Did you use the "onMouse" event, similar to what's done in the demo "RtClick"? Dan Moyer ----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Subject: list problem > > I have created a list of things "create (List, .......) " and would like to > display detail info about the item highlighted in the status bar. The only > way I know to do this is to trap arrow keys, pageup, pagedown home, end and > mouse click so I know that an item was highlighted. My problem is windows > selects the item AFTER i have done a getItem, so I am one behind. I have set > returnValue(-1) but it doesen't help. > > Does anyone know how I can detect which item is selected w/o having to trap > all the keys..... or otherwise shed some light on the problem? > > george > > > >
3. Re: list problem
- Posted by Don Phillips <Graebel at hotmail.com> Jun 06, 2002
- 455 views
>I have created a list of things "create (List, .......) " and would like to >display detail info about the item highlighted in the status bar. The only >way I know to do this is to trap arrow keys, pageup, pagedown home, end and >mouse click so I know that an item was highlighted. My problem is windows >selects the item AFTER i have done a getItem, so I am one behind. I have >set >returnValue(-1) but it doesen't help. > >Does anyone know how I can detect which item is selected w/o having to trap >all the keys..... or otherwise shed some light on the problem? > >george Hey George, something in your program isnt right I think. You shouldnt have to do all of that to detect a change. Send me your code and I will look at it... DPhillips at KBSI.com or Graebel at HotMail.com
4. Re: list problem
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jun 06, 2002
- 466 views
or this, it's easier: -- code generated by Win32Lib IDE v0.10.5 include Win32Lib.ew without warning ---------------------------------------------------------------------------- ---- -- Window Window1 global constant Window1 = create( Window, "Window1", 0, Default, Default, 400, 300, 0 ) global constant List2 = create( List, "List2", Window1, 16, 16, 152, 188, or_all({LBS_MULTIPLESEL,LBS_EXTENDEDSEL}) ) global constant LText3 = create( LText, "LText3", Window1, 192, 40, 164, 36, 0 ) ---------------------------------------------------------------------------- ---- for n = 1 to 10 do addItem(List2, sprint(n)) end for ---------------------------------------------------------------------------- ---- procedure List2_onChange () setText(LText3, getItem(List2,getIndex( List2 ))) end procedure onChange[List2] = routine_id("List2_onChange") WinMain( Window1, Normal ) ----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Sent: Thursday, June 06, 2002 5:06 AM Subject: list problem > > I have created a list of things "create (List, .......) " and would like to > display detail info about the item highlighted in the status bar. The only > way I know to do this is to trap arrow keys, pageup, pagedown home, end and > mouse click so I know that an item was highlighted. My problem is windows > selects the item AFTER i have done a getItem, so I am one behind. I have set > returnValue(-1) but it doesen't help. > > Does anyone know how I can detect which item is selected w/o having to trap > all the keys..... or otherwise shed some light on the problem? > > george > > > >
5. Re: list problem
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Jun 06, 2002
- 476 views
the demo I sent would work better if the extended select styles were replaced with 0. Dan Moyer ----- Original Message ----- From: "George Walters" <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Subject: list problem > > I have created a list of things "create (List, .......) " and would like to > display detail info about the item highlighted in the status bar. The only > way I know to do this is to trap arrow keys, pageup, pagedown home, end and > mouse click so I know that an item was highlighted. My problem is windows > selects the item AFTER i have done a getItem, so I am one behind. I have set > returnValue(-1) but it doesen't help. > > Does anyone know how I can detect which item is selected w/o having to trap > all the keys..... or otherwise shed some light on the problem? > > george > > > >
6. Re: list problem
- Posted by George Walters <gwalters at sc.rr.com> Jun 06, 2002
- 450 views
Thanks for the help. I was going about it the hard way. the 'on change did the trick and a lot easier..... onChange[List2] = routine_id("List2_onChange") george ----- Original Message ----- From: "Dan Moyer" <DANIELMOYER at prodigy.net> To: "EUforum" <EUforum at topica.com> Subject: Re: list problem > > or this, it's easier: > > -- code generated by Win32Lib IDE v0.10.5 > > include Win32Lib.ew > without warning > > -------------------------------------------------------------------------- -- > ---- > -- Window Window1 > global constant Window1 = create( Window, "Window1", 0, Default, Default, > 400, 300, 0 ) > global constant List2 = create( List, "List2", Window1, 16, 16, 152, 188, > or_all({LBS_MULTIPLESEL,LBS_EXTENDEDSEL}) ) > global constant LText3 = create( LText, "LText3", Window1, 192, 40, 164, 36, > 0 ) > -------------------------------------------------------------------------- -- > ---- > for n = 1 to 10 do > addItem(List2, sprint(n)) > end for > -------------------------------------------------------------------------- -- > ---- > procedure List2_onChange () > setText(LText3, getItem(List2,getIndex( List2 ))) > end procedure > onChange[List2] = routine_id("List2_onChange") > > WinMain( Window1, Normal ) > > > ----- Original Message ----- > From: "George Walters" <gwalters at sc.rr.com> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, June 06, 2002 5:06 AM > Subject: list problem > > > > > > I have created a list of things "create (List, .......) " and would like > to > > display detail info about the item highlighted in the status bar. The only > > way I know to do this is to trap arrow keys, pageup, pagedown home, end > and > > mouse click so I know that an item was highlighted. My problem is windows > > selects the item AFTER i have done a getItem, so I am one behind. I have > set > > returnValue(-1) but it doesen't help. > > > > Does anyone know how I can detect which item is selected w/o having to > trap > > all the keys..... or otherwise shed some light on the problem? > > > > george > > > > > > > > >