Visible attribute and the gap left in Flash forms

The visible attribute and the gap left in Flash forms

First of thanks to Kelly Keith to actually putting me onto this solution after my post to CF-Talk about removing the gap left in when you set an item like visibilites to hidden. To quote Kelly direct the short answer is "When visible is set to false set the height to a negative number."

Below I've got three examples of problem, the solution and an event driven solution.

Posted: 23-Jul-2006

View: 5143

Permalink: here

Comments

An alternative solution would be to use an inline conditional on the height attribute:

height="{pan1.visible == true ? 100 : -1}"

#1 todd
24/Jul/06 2:27 AM

p.s. this black KILLS my eyes sometimes - like now, when i'm super tired...

#2 todd
24/Jul/06 2:28 AM

@Todd, cheers for the inline comment. As for the black I am getting rid of it when I finally move up to ver 5 of BlogCFC which should hopefully be soon!

#3 Andy J
24/Jul/06 7:49 AM

Andy,

I've always used 0 instead of -1, though maybe that won't work and I'm just remembering wrong. What I do know is that I've basically used this technique to put debugging tools (i.e. a text area, a text field and a button to dump the contents of objects to text) into a flash form and leave them there, testing the UI and finally remarking them out before I go to production. I almost NEVER remove them entirely because they're handy to have when you need to enhance later on.

I just feel like leaving a comments today, I guess. :) On to the next link in the Goog!

Laterz,
J

#4 Jared Rypka-Hauer
24/Jul/06 1:50 PM

I just wanted to tell you "BLESS YOU!!!" This has had me puzzled for days!!!!!!!! This solution really works well, but can you tell me how I could make this more universal so that I could hide multiple panels with one method call. I am really rusty with CF and as of right now I plan to have a Show/Hide method for each Panel in my form. I know that isn't the best way to do it, but I think I will have to do that for now.

#5 Justin McNeal
19/Mar/10 12:40 AM

I just wanted to tell you "BLESS YOU!!!" This has had me puzzled for days!!!!!!!! This solution really works well, but can you tell me how I could make this more universal so that I could hide multiple panels with one method call. I am really rusty with CF and as of right now I plan to have a Show/Hide method for each Panel in my form. I know that isn't the best way to do it, but I think I will have to do that for now.

#6 Justin
19/Mar/10 12:40 AM