Subwindows on floating panels
gregorK
I was trying to make a floating panel with a subwindow (notebook or graph) but I stumbled upon a problem: when creating a floating panel one has to use
SetActiveSubwindow _endfloat_
at the end. So far so good. The problem is that when I click inside the subwindow (i.e. notebook or graph) the default target becomes the floating panel (whatever window one selects, e.g. a Procedure Window, the floating panel remains the target) which should not happen since I have used the necessary SetActiveSubwindow _endfloat_
command at the end of the panel definition macro.Am I making some trivial mistake somewhere, or are subwindows in floating panels not allowed?
Thank you for your help.
Gregor
(WindowsXP and IGORPro 6.21)
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
February 22, 2013 at 09:42 am - Permalink
NewPanel /W=(470,237,770,437)/FLT=1
Display/W=(75,50,225,150)/HOST=#
RenameWindow #,G0
SetActiveSubwindow ##
SetActiveSubwindow _endfloat_
End
If you execute
Panel0()
on the command line you get a basic panel with a graph subwindow. Everything works as expected until you click on the subwindow (graph). From then on if you click for example on a procedure window the Igor Menu does not show the Procedure Menu (i.e. the main focus remains on the selected subwindow).I found in the IGOR help this text:
A floating panel does not have keyboard focus. However, a floating panel gains keyboard focus when a control that needs focus is clicked. Focus remains until you press Enter or Escape for a text entry in a setvariable, press Tab until no control has the focus, or until you click outside a focusable control.
On Macintosh, if a floating panel has focus and you activate another window, focus will leave the panel. However on Windows, if a floating panel has focus and you activate another window, the activate sequence will be fouled up leaving the windows in an indeterminate state. Consequently, it is important that you always finish any keyboard interaction started in a floating panel before moving on to other windows. If this can cause confusion, you should not use controls such as SetVariable and ListBox in a floating panel.
I believe this is happening also in my case with the embedded subwindow getting focus ... The only difference is that clicking outside of the selected subwindow (inside the panel) does not help (as stated in the cited text).
February 22, 2013 at 10:10 am - Permalink