1. How to Restrict Clickability in List
- Posted by robcrag at rapideuflorida.com Apr 12, 2004
- 402 views
I've got a list that looks like this: Set One Form A Form B Form C Set Two Form D Form E Form F Set Three Form Z How do I make it so that only the "Form" items can be selected and not the "Set" items? Do I have to use some special control or will a listbox suffice? Thanks!
2. Re: How to Restrict Clickability in List
- Posted by "Greg Haberek" <ghaberek at wowway.com> Apr 12, 2004
- 420 views
this should work. if an item starting with "Set" is selected, it moves to the next item, if it exists, or it sets the index to 0 happy euphoria-ing! ~Greg -- begin code -- procedure myList_onChange( integer self, integer event, sequence params ) integer index sequence text -- get the index index = getIndex( self ) -- make sure an item is selected if index = 0 then return end if -- get the text of item 'index' text = getItem( self, index ) if match( "Set", text ) = 1 then -- 'Set' is the first 3 letters of text -- if it is a 'Set' item then move the index to the next item, if it exists if index+1 <= getCount( self ) then setIndex( self, index+1 ) else -- did not exist, set index to 0 setIndex( self, 0 ) end if end if end procedure setHandler( myList, w32HChange, routine_id("myList_onChange") ) -- end code -- ----- Original Message ----- From: "Guest" <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Monday, April 12, 2004 12:50 PM Subject: How to Restrict Clickability in List > > > posted by: robcrag at rapideuflorida.com > > I've got a list that looks like this: > > Set One > Form A > Form B > Form C > Set Two > Form D > Form E > Form F > Set Three > Form Z > > How do I make it so that only the "Form" items can be selected and not the "Set" items? Do I have to use some special control or will a listbox suffice? > > Thanks! > > > > For Topica's complete suite of email marketing solutions visit: > http://www.topica.com/?p=TEXFOOTER >
3. Re: How to Restrict Clickability in List
- Posted by GilliamNeverplent at aol.com Apr 13, 2004
- 413 views
Greg helped with: > this should work. if an item starting with "Set" is > selected, it moves to the next item, if it exists, > or it sets the index to 0 > ~Greg > > -- begin code -- > procedure myList_onChange( integer self, integer Greg, two questions: 1) why onChange and not onClick? 2) Can I actually prevent a "Set" item from being clicked? As it is, it highlights as it's clicked on, but the preferred behavior is that it does not even respond to the click. Okay, 3 questions... 3) When it disregards a click, how do I make it not turn off the already selected item? This is a multiple-select list, and I think setting the index to '0' negates that. Oh! I guess I'll get the list of already selected items first, then test, then restore or whatever... right?! :)