New topic: 

WebView.ControlWithName.property?

<http://forums.realsoftware.com/viewtopic.php?t=43907>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        Akiland          Post subject: 
WebView.ControlWithName.property?Posted: Mon May 07, 2012 2:10 am               
                  
Joined: Tue Jan 04, 2011 3:02 am
Posts: 735
Location: Jönköping, Sweden                My app is built in a single 
WebPage using a lot of container controls and they are shown/hidden when menu 
buttons are pressed.

Now, I'm trying to build a method to call when menu buttons are pressed to 
simplify the hiding and showing procedure 
When a a button is pressed I have a method called 
showPanel("container_to_show").

In this method I can loop through all controls on the page and hide them and 
only show the container that has the name passed to this method.
Now, I don't want to hide ALL controls on the page, only some. Is there a way 
to check if the controls has a property=true when looping through them?

Could something like this be done?
cNames() is an Array containing the names of all controls on the page.
panelName is the name of the container that should be shown.
hideMe could be a property of all containers that should be shown/hidden.

For i = 0 to cNames.Ubound
  if panelName <> cNames(i) then
  if mainPage.ControlWithName(cNames(i)).hideMe = true then <--This don't seem 
to work?
  mainPage.ControlWithName(cNames(i)).Visible = false
  end if
else
  mainPage.ControlWithName(panelName).Visible = true
end if
next


This was my first attempt. If there are better ways to do this, I'm all ears    
 
_________________
Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.7
Using Subversion on a Synology DS409+
REAL.Studio Web Edition 2011r3  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to