realbasic-nug
[Top] [All Lists]

Re: composite windows fire events differently? or a bug?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: composite windows fire events differently? or a bug?
From: Mark Levinson <mmlevinson at gmail dot com>
Date: Fri, 30 Nov 2007 16:27:23 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <A355FC06-CB43-4C14-B65B-E025F196EB28 at sentman dot com> <3107C580-10C5-46DC-BB06-71D0B8C3FF21 at declareSub dot com> <02E7E0FB-3426-440A-A6A9-A5DCB9DFD0A0 at sentman dot com>
On Nov 29, 2007, at 8:38 PM, James Sentman wrote:

>
> The first event I noticed was wrong was that my windows actually paint
> themselves before my open event fires. Shouldn't the open event fire
> before the first paint event? I"m fairly certain that is what I"m
> seeing here and that is just wrong. I will explore the work around of
> starting with an invisible window and then setting it to visible at


James:

All the controls get their Open events before the window's Open  
Event, starting
with Control.index = 0 and working up the window's control array.

To force my controls and other Class properties to initialize before  
the window's Open event,
I put a call to my own initialization method in the Open event of the  
lowest order control....i.e. Control.Index = 0
Then, everything gets set up before the window takes over.....For  
example, if you have a TabPanel that
is index = 0 in the control list, then...

TabPanel.Open
        initWindow


In my initWindow method, I would call  a method like :   
repositionControls, which puts the controls where
I want them based on the window's dimensions.   This method can also  
be called
>from the window's Resize/Resizing events, keeping your control  
positioning code in one place for easier
maintenance.

Hope this is of some relevance.....

Mark Levinson
Hutchinson, KS

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>