Go Back   CodingForums.com > :: Client side development > Flash & ActionScript > Adobe Flex

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-25-2012, 06:45 PM   PM User | #1
deepsheep
New to the CF scene

 
Join Date: Jun 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
deepsheep is an unknown quantity at this point
Having a problem with NavigatorContent and Visibility

I have been working on this for more than a day, so it's time for some help... I'm not a Flex/Flashbuilder expert, so any help is appreciated...

I've got a NavigatorContent object that I want to set the visibility on based on the content of the object. Bascially, if it is empty, I don't want to show it. However, no matter what I do, I can't actually get the visibility to change. It's ALWAYS visible. I've checked the .visibile property and it IS set correctly, but I can still see the tab. So, if I get the childNavReports.visible, it will say "false" but still display...

Here's the code where it's built:
Code:
var childNavReports:NavigatorContent = new NavigatorContent();
childNavReports.name="assessment_reports"

childNavReports.percentWidth = 100;
childNavReports.percentHeight = 100;
childNavReports.minWidth = 780;
childNavReports.minHeight = 150;
childNavReports.maxHeight = 170;
childNavReports.visible=false;
loadReportTree(childNavReports,graphic,layer); //this is where it's populated
childNavReports.visible=false; 
childNavReports.enabled=false;
childNavReports.includeInLayout=false;

tabNavAssessment.addElement(childNavReports);
I've even tried the following:
Code:
childNavReports.setStyle("visibility", "hidden;");
tabNavAssessment.getChildByName("assessment_report s").visible=false;
tabNavAssessment.getTabAt(tabNavAssessment.getItem Index(tabNavAssessm ent.getChildByName("assessment_reports"))).visible =false;
tabNavAssessment.getTabAt(tabNavAssessment.getItem Index(tabNavAssessm ent.getChildByName("assessment_reports"))).enabled =false;
tabNavAssessment.getTabAt(tabNavAssessment.getItem Index(tabNavAssessm ent.getChildByName("assessment_reports"))).include InLayout=false;

Global.getLogger(this).info("childNavReports.visib le added to tabs"+ childNavReports.visible.toString());

tabNavAssessment.getChildByName("assessment_report s")

tabNavAssessment.getTabAt(2).visible=false; // 2 is the correct index
tabNavAssessment.getTabAt(2).includeInLayout=false ;
tabNavAssessment.getTabAt(2).enabled=false;
Any ideas? Or work arounds? Thanks!
deepsheep is offline   Reply With Quote
Old 06-26-2012, 03:45 AM   PM User | #2
Inigoesdr
Super Moderator


 
Inigoesdr's Avatar
 
Join Date: Mar 2007
Location: Florida, USA
Posts: 3,601
Thanks: 2
Thanked 397 Times in 390 Posts
Inigoesdr is a jewel in the roughInigoesdr is a jewel in the roughInigoesdr is a jewel in the rough
Check out the last 2 replies in this thread for two different options:
http://forums.adobe.com/thread/650960
Inigoesdr is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08 PM.


Advertisement
Log in to turn off these ads.