PDA

View Full Version : indicate selection w/o triggering event?


xmiinc
05-23-2003, 06:53 PM
I'm relatively new to FMX...can this be done?
I have a scenario where I want the selection in one listbox to visually indicate a reverse-relationship by highlighting its 'container' entry in a 2nd listbox, but without a resulting action/event being triggered in that 2nd listbox that would otherwise be the case, if I used the mouse. I've got the reverse-relationship part happening but how to suppress the resulting event that makes unwanted changes...as if I were actually selecting that item?

Basically, I'm in a List-All-Items mode, select an item, indicate a reverse-relationship to the container of that item, but *do not* actually select the container, or else you jump out of List-All-Items mode...somehow I need to do the indication without the actual select.

Any suggestions? Would a hitTest, as a 2nd parameter in a select-condition be appropriate here?

caballero
05-23-2003, 06:58 PM
HI

im relative new to flash, a nowdays im working in flash 5, but i think is really difficult to find an answer if we didnt know the way you are making the things:

please use code to let us know how are you mannaging the problems and maybe we could help you

xmiinc
05-23-2003, 07:16 PM
Thanks, Caballero, but I prefer to keep it as a verbal description because extracting my existing code from the much larger project won't make any better sense of it, and posting the whole 300 lines of the project certainly won't generate any more positive interest in this thread!

The question, at it's most basic is: can an item in a listbox component be visually indicated without also triggering a selection-event?

That's it. A simple concept, with a not-so-easily-discernable solution (for me anyway!)

xmiinc
05-25-2003, 07:15 PM
well, a preliminary solution was to simply consolidate 2 existing buttons into one to facilitate a 'toggle', and to create a 'dummy' function that didn't do anything other than allow a selection to take place without calling a previously-existing function that showed the contents of the container selected. However, when I implemented this, it also became evident that building this into an existing project is a classic example of "feature-creep". And in fact, incorporating the logic became a nightmare, spawning new issues as old ones were solved. I came veeerrry close but, no cigar. I'm either going to have to do a more serious rewrite of existing code, or simply declare victory and walk away with a lesson learned in project-planning.

Bottom-line: there is no property or method that can do this after the fact without writing a fair amount of code. As near as I can tell, a "highlight-selection" has to be planned for in advance.