Keeping a window on top

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Keeping a window on top

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:15 pm

by Torrie Moore >> Tue, 22 Jun 1999 1:02:45 GMT

Hi.

I have a message window that I want to keep on top of the all other application windows. There doesn;t seem to be a StayOnTop style as there is in Delphi etc. Can I do something similar in Jade?

Torrie Moore
torrie@concept-eng.co.nz

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Keeping a window on top

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:15 pm

by Darrell Duniam >> Tue, 22 Jun 1999 2:28:46 GMT

Hi Torrie,

I think the (Form) method is 'self.alwaysOnTop' (set to true).

darrell.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Keeping a window on top

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:15 pm

by Torrie Moore >> Tue, 22 Jun 1999 9:24:22 GMT

Thanks for that.

I can use the method but it is not visible in the class browse in the Root Schema (Jade 42). Are there more function that are not visible in the class browser?

Torrie Moore

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Keeping a window on top

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:15 pm

by Craig Shearer >> Tue, 22 Jun 1999 20:14:03 GMT

Hmmm... if you press F11 on the method name, you can see the implementation of the method which is as follows...

alwaysOnTop(onTop: Boolean) is JadeFormAlwaysOnTop in jadpmap subschemaHidden;

It's that little keyword: subschemaHidden which means that unless you know about it, you won't see it. Why this method is marked as subschemaHidden is beyond me! Put in an NFS to have the method made visible.

As to whether there are other methods marked the same way - of course! It'd be nice to have all the really useful ones revealed!

The other method of achieving what you want would be to use the Windows API function - setWIndowPos, which might give you some other interesting options too.


Actually, it's not very difficult to find hidden stuff. You can write a workspace method to show you all the methods on any class, including the subschemaHidden methods too:

vars
ms: MethodSet;
m: Method;
begin

create ms transient;
Form.allMethods(ms);

foreach m in ms do
write m.getName;
endforeach;

epilog
delete ms;


This reveals some interesting methods... of course, you need to proceed with caution. To find the signature of the method, probably the easiest way is to code a call to the method, then use the F11 key to look at the source for the method. With some intelligent guessing, you're well on your way to writing a book "JADE - Undocumented Secrets!". :-)

Hope this helps,
Craig.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 24 guests