Bring control to front with code 
Author Message
 Bring control to front with code

Here's the situation: I have a set of canvases that cover most of a window,
called of class page called thepage(). As the user needs more pages, a
routine is called to create them and position them correctly. (I also have
the routine to destroy them too) The problem is that I have two lines, Line1
and Line2 used to create left and right boundaries so that things look good
on the metal window. However, as the new canvases are created, they are
positioned on top of the lines, so it defeats the purpose.

I tried using Line1.controlorder = self.controlcount - 1, but that doesn't
exist. So I'm wondering how I might make sure the lines are always on top.

--
-Tom "Tekcor" McGrath
iMac, Therefore, I am



Wed, 06 Apr 2005 08:48:34 GMT  
 Bring control to front with code

Quote:

> Here's the situation: I have a set of canvases that cover most of a window,
> called of class page called thepage(). As the user needs more pages, a
> routine is called to create them and position them correctly. (I also have
> the routine to destroy them too) The problem is that I have two lines, Line1
> and Line2 used to create left and right boundaries so that things look good
> on the metal window. However, as the new canvases are created, they are
> positioned on top of the lines, so it defeats the purpose.

> I tried using Line1.controlorder = self.controlcount - 1, but that doesn't
> exist. So I'm wondering how I might make sure the lines are always on top.

Set the open event of the canvas subclass to set me.visible=false. Open
happens before the control becomes visible.

Also give the canvas subclass a method for setting it's position;
something like SetPosition(top,left,width,height). That method can be
resonsible for setting me.visible=true whenever it's called. Or you
could just make the canvas visible whenver you change it's position from
the window.

HTH.

--
"Freedom is a scary thing/Not many people really want it/
 Me? I keep my distance..." -- Laurie Anderson



Wed, 06 Apr 2005 14:29:25 GMT  
 Bring control to front with code

Quote:


>> Here's the situation: I have a set of canvases that cover most of a window,
>> called of class page called thepage(). As the user needs more pages, a
>> routine is called to create them and position them correctly. (I also have
>> the routine to destroy them too) The problem is that I have two lines, Line1
>> and Line2 used to create left and right boundaries so that things look good
>> on the metal window. However, as the new canvases are created, they are
>> positioned on top of the lines, so it defeats the purpose.

>> I tried using Line1.controlorder = self.controlcount - 1, but that doesn't
>> exist. So I'm wondering how I might make sure the lines are always on top.

> Set the open event of the canvas subclass to set me.visible=false. Open
> happens before the control becomes visible.

> Also give the canvas subclass a method for setting it's position;
> something like SetPosition(top,left,width,height). That method can be
> resonsible for setting me.visible=true whenever it's called. Or you
> could just make the canvas visible whenver you change it's position from
> the window.

> HTH.

I'm not quite sure I get it. The problem is that, for example, 24 pages
cannot fit in the window, so I need to scroll. So I have a scrollbar move
them left and right. Now, I'd love to be able to "mask" them so that they
are only visible in a certain region of the window, but I cannot, so I use
the window's left and right borders. Everything looks fine on a normal
window, but metal windows have the 11 pixel border, and things look odd. So
these lines are for show only.

So moving the classes so that they do not overlap the lines is not going to
work.

Are you saying that classes created as invisible would remain behind the
lines when I make them visible? That doesn't seem to make sense to me.

--
-Tom "Tekcor" McGrath
iMac, Therefore, I am



Wed, 06 Apr 2005 22:09:45 GMT  
 Bring control to front with code


Quote:
> So I'm wondering how I might make sure the lines are always on top.

You can't.  There's no way to change control order at runtime.  Perhaps
you need to try to find another solution.  Is it really necessary to
create all these different canvases?  Remember, you don't need one
canvas for every thing you want to draw.  A canvas is just a PLACE to
draw, you can draw anything anywhere in it.


Thu, 07 Apr 2005 04:43:11 GMT  
 Bring control to front with code
On 10/19/02 4:43 PM, in article

Quote:



>> So I'm wondering how I might make sure the lines are always on top.

> You can't.  There's no way to change control order at runtime.  Perhaps
> you need to try to find another solution.  Is it really necessary to
> create all these different canvases?  Remember, you don't need one
> canvas for every thing you want to draw.  A canvas is just a PLACE to
> draw, you can draw anything anywhere in it.

Yes, I know, and I utilize it nicely. I'm writing a program that manages
content for school newspapers (it's a lot better than is sounds). For ease,
I use different canvases for like
editorwindow.thepage(page).article(article) to get the article I need.

[ I started this is 3.5, before I had dictionaries and such. Now I'm
reprogramming everything to use them ]

--
-Tom "Tekcor" McGrath
iMac, Therefore, I am



Thu, 07 Apr 2005 05:04:25 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Bringing app to front, with mouse click to global window

2. How do you bring you app to the front

3. Bring self to front?

4. Send app to back/bring to front

5. How do I bring a window to the front

6. Window - bring to front

7. Bring App to front?

8. Bringing window to front.

9. Bringing Finder to front

10. Bring a Window to the Front

11. How to bring window to front

12. How to bring window to front

 

 
Powered by phpBB® Forum Software