1. 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

new topic     » topic index » view message » categorize

2. Re: list problem

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
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: 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

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

new topic     » goto parent     » topic index » view message » categorize

4. 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
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

5. Re: list problem

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
>
>
>
>

new topic     » goto parent     » topic index » view message » categorize

6. Re: list problem

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
> >
> >
> >
>
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu