On Apr 15, 2007, at 6:15 PM, Carlo Rubini wrote: > Unfortunatelly I deleted the digest containing a post dealing about > the state of a window, specifically window.visible/not > window.visible. So I cannot refer to it by Re: <subject>. > > As far as I remember, the poster (Jim?) was more or less stating > that after hiding a window (window2) if, in window1, I said, > > if window2.visible then window2.doSomething > > then the doSomething would be executed even if window2 was hidden. > > That worried me, so I created a new project with two windows: > > window2 has got a pushButton whose caption is 'untitled'; > in window1 there are three buttons: > > button1- action event: window2.show > button2- action event: window2.hide > button3-action event: if window2.visible then > window2.pushButton1.caption = "OK" > > > Launching the project I click button1, button2, button3, and again > button1. > > I find that the caption of the pushButton of window2 is still > 'untitled'; therefore the window2.visible conditional worked ok. > > This in RB 5.5.5 - OS 10.4
Hi Carlo, And therein lies the difference - you're using 5.5.5. The new 200x versions don't work that way when I test your code (or when I ran my old code). I've now created a variable on the windows in question called IsShown As Boolean. I then set it appropriately as the windows are shown or hidden. Tim -- Tim Jones [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
