View previous topic :: View next topic |
Author |
Message |
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Apr 17, 2007 10:06 am Post subject: Can a window be locked in position? |
|
|
Is there any way to make a window fixed in position?
I have fixed the size of my main window with the %ww option, and I have in two or three places drawn a block of controls over the controls on the main window so that the latter can't be reached (temporarily). However, it is possible to slide the main window out from underneath so they can be seen. I'd really like to disable the maxbox (button on title bar between minimise button and close button), but when I do that, the main window obscures the icon bar at the bottom of the screen (I'm using XP). No_minbox is too drastic, as that prevents the main window being iconised, whereas I'm happy for that to happen.
My current approach is to use MOVE_WINDOW@ to keep moving the main window back to its proper place, and I am about to experiment on putting this into a callback for a %dl timer.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Tue Apr 17, 2007 12:17 pm Post subject: |
|
|
Various possibilities come to mind. For example
a) hide the controls (in the main window) that you don't want to be accessed (set_control_visibility@), or
b) put the new block of controls into a child window where the main window is the parent (%aw).
c) put the new block of controls into a modal dialog box. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Apr 17, 2007 3:12 pm Post subject: |
|
|
Thanks for the rapid reply. The %fr/%aw approach looks like the answer, in the context of what I've done already, but may take me a while to do.
I tried the MOVE_WINDOW@ approach with a %dl timer callback, and the time interval is critical - too short, and the screen flickers, too long, and the jumps back into position are very distracting.
Eddie |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Tue Apr 17, 2007 10:25 pm Post subject: |
|
|
Paul,
Having given some thought to this, I've been investigating your suggestion (c). My block of controls in the top window doesn't have a caption, so that it looks like part of the underlying window (i.e. it looks like I've replaced the controls in the underlying window with a new set). When the top window is drawn, the bottom window becomes moveable - but when I "Finish", the bottom window becomes immoveable again. Presumably, by not having a caption, the overlying window is no longer modal. If it was, the problem of being able to move the underlying window would go away.
How do I make a captionless window modal? Giving it a caption (bar) means that the top window becomes moveable!
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Wed Apr 18, 2007 1:21 pm Post subject: |
|
|
Basically you get a modal dialog by not using %lw or a similar device to leave the window open. The dialog closes when winio@ returns.
I guess you can use %ww[no_caption] with such a window.
I am assuming that the underlying window cannot be activated whist this window is open. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Wed Apr 18, 2007 7:35 pm Post subject: |
|
|
I just checked, and the uppermost window isn't subject to a %lw, but I'm evidently doing something equivalent, so I'll try to do a small test case, and work from there. As always, little things like this cause weeks of work (esp as this is a spare time activity!), whereas getting the answers from an involved mathematical procedure that has been working for 30 or more years take virtually no time at all !
Eddie |
|
Back to top |
|
|
|