Re: setting indexes in multiple list boxes

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

Thanks alot for the help.

--- Dan Moyer <DANIELMOYER at prodigy.net> wrote:
> 
> Jack,
> 
> This will do it, though it's a little "jerky"
> looking, as the non-clicked in
> lists only change after you release the mouse button
> in the clicked in list:
> 
> -- CODE FOLLOWS:
> --  code generated by Win32Lib IDE v0.10.6
> 
> 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, 8, 12, 92, 172, 0 )
> global constant List3 = create( List, "List3",
> Window1, 116, 12, 88, 172,
> 0 )
> global constant List4 = create( List, "List4",
> Window1, 216, 12, 92, 176,
> 0 )
> ----
> for n = 1 to 10 do
>  addItem(List2, "item " & sprint(n) & " list1")
>  addItem(List3, "item " & sprint(n) & " list2")
>  addItem(List4, "item " & sprint(n) & " list3")
> end for
> ----
> procedure List2_onChange ()
> integer index
> object aList
> aList = getSelf()  -- gets "handle" of list that
> item was selected in
> index = getIndex(aList)  -- gets index of selected
> item in that list
> setIndex(List2, index)
> setIndex(List3, index)   -- these 3 set indexes for
> all 3
> setIndex(List4, index)
> end procedure
> onChange[List2] = routine_id("List2_onChange")  --
> these trap any changes in
> onChange[List3] = routine_id("List2_onChange")  --
> any list, and activate
> one routine
> onChange[List4] = routine_id("List2_onChange")  --
> to handle the change
> 
> WinMain( Window1, Normal )
> 
> -- CODE ENDS
> 
> Dan Moyer
> 
> ----- Original Message -----
> From: <jacktarred at yahoo.com>
> To: "EUforum" <EUforum at topica.com>
> Sent: Monday, April 15, 2002 2:26 PM
> Subject: setting indexes in multiple list boxes
> 
> 
> > I have several list boxes in a program.  Is there
> any
> > way to configure my list so that if a person
> selects
> > item #3 in list box #2, all the list boxes are set
> to
> > item #3?  And when he/she changes his/her mind and
> > picks item #7 in list box 4 all the indexes are
> reset?
> >
> > Thanks in advance for the help.
> >
> >
> 
> 
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu