short cuts to toggle between procedures

I know Ctrl+Alt+M can cycle through the open procedure windows

However, it is not an efficient way to locate a procedure when the number of procedure is big (considering 100 procedures)

More often, we just need toggle between two procedures: the current procedure and the previous procedure (like alt-tab in Windows)

Is there a quick way to realize this?

thanks
In IP7, you can keep the Windows->Procedure Windows->Procedure Browser dialog open and double click on the procedures listed there to bring the window forward. Not quite the same thing you are asking about, but it's a little closer than just Alt-Tabbing through them all.
You can toggle between any two windows by first bringing them to the front and then,

On Windows, press Ctrl-E (Send to back) and Shift-Ctrl-E (Bring to front).

On Macintosh, press Cmd-tilde (Send to back) and Shift-Cmd-tilde (Bring to front). Tilde is ~. I'm not sure how you do this on a non-English keyboard.
hrodstein wrote:
You can toggle between any two windows by first bringing them to the front and then,

On Windows, press Ctrl-E (Send to back) and Shift-Ctrl-E (Bring to front).

On Macintosh, press Cmd-tilde (Send to back) and Shift-Cmd-tilde (Bring to front). Tilde is ~. I'm not sure how you do this on a non-English keyboard.


this works!

thanks!
hrodstein wrote:
You can toggle between any two windows by first bringing them to the front and then,

On Windows, press Ctrl-E (Send to back) and Shift-Ctrl-E (Bring to front).

On Macintosh, press Cmd-tilde (Send to back) and Shift-Cmd-tilde (Bring to front). Tilde is ~. I'm not sure how you do this on a non-English keyboard.


Thanks for your help.

I have another question. People in our lab complain about the too small looking of the controls on a panel in Igor6.
Of course, they are using igor 6 under win10 with a high-resolution display.
We know Igor7 works fine on high-resolution displays. But we now need igor6 because we have a great lots of procedures which run fine under igor6 but not so good under igor7(I am trying to find the reason, but before that ,Igor 6 is prefered).

From igor7's helptopic about high-resolution display, I know the too small looking is because controls command uses pixels, instead of points.
Is there an easy way to make the control command draw controls in points under igor 6?
or any other solution can make the controls look normal?

Thanks
Do you mean controls in Panels are too small? If so, I deal with this by increasing the font size of every control to 12, and setting the font to Verdana, which is intrinsically huge. I also routinely use magnification of Procedure and History windows at 125-150% on my Mac. It helps these tired old eyes.

-Matthew
xufriedman wrote:
Do you mean controls in Panels are too small? If so, I deal with this by increasing the font size of every control to 12, and setting the font to Verdana, which is intrinsically huge. I also routinely use magnification of Procedure and History windows at 125-150% on my Mac. It helps these tired old eyes.

-Matthew


Yes.

If number of controls is small, I can make it looks bigger by just dragging each control to a proper size, as you say.
However, there are about twenty panels, each of them having dozens of controls. So...

Besides, deliberatly set each control to fit Igor6 may make it abnormal in igor7 or on a normal-resolution display.

Still thank you:)
The only way to get Igor 6 to look right on a high-resolution display is to set the display's resolution to lower DPI. Of course, you lose the nice-looking high resolution graphics.

The best, of course, is to use Igor 7. But you say your procedures have problems. Are there compile errors? Or simply bugs? If you have not done it already, you should be sure that the top of your procedure windows has #pragma rtglobals=3 to get the benefit of more stringent error checking.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
xufriedman wrote:
Do you mean controls in Panels are too small? If so, I deal with this by increasing the font size of every control to 12, and setting the font to Verdana, which is intrinsically huge. I also routinely use magnification of Procedure and History windows at 125-150% on my Mac. It helps these tired old eyes.

-Matthew


I find this user-defined menu useful to change the size of controls in the the active panel:

Edit: the procedure code I put here doesn't solve the problem of the entire panel being too small, it just made controls inside the panel bigger, potentially causing text truncation inside of controls.

So I've removed the previously posted (and incomplete code) for now and will think about how to solve the problem another way (probably using PanelResolution on Igor 7).

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
johnweeks wrote:
The only way to get Igor 6 to look right on a high-resolution display is to set the display's resolution to lower DPI. Of course, you lose the nice-looking high resolution graphics.

The best, of course, is to use Igor 7. But you say your procedures have problems. Are there compile errors? Or simply bugs? If you have not done it already, you should be sure that the top of your procedure windows has #pragma rtglobals=3 to get the benefit of more stringent error checking.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com


We dont have compile errors.
The problem is that: our procedure runs slowly in igor7, while not the case in Igor6.
Especially the interface response becomes very slow when the number of control panel and other objects gets large. (our data is typically 300~700M and the procedure files is about 80 M)
There is no other difference except running speed.


Thanks
JimProuty wrote:
xufriedman wrote:
Do you mean controls in Panels are too small? If so, I deal with this by increasing the font size of every control to 12, and setting the font to Verdana, which is intrinsically huge. I also routinely use magnification of Procedure and History windows at 125-150% on my Mac. It helps these tired old eyes.

-Matthew


I find this user-defined menu useful to change the size of controls in the the active panel:

#pragma IndependentModule=MyStuff
#pragma moduleName=MyModule
#pragma version=7   // circa Igor 7
Menu "Panel", dynamic, hideable
    FixedSizeMenu(), /Q, ToggleFixedSizePanel()
    Submenu "Appearance"
        AppearanceMenuItems(), /Q, SetWindowAppearance()
        "-"
        "Set \"_IgorLarge\" fonts", /Q, SetControlFonts(JimsStuff#ActivePanel(), "_IgorLarge")


(I extracted this from a larger file, so I hope I didn't leave anything amiss.)

--Jim Prouty
Software Engineer, WaveMetrics, Inc.

I'll do test, if it works, it would be great!!
Thanks:)
JimProuty wrote:


I find this user-defined menu useful to change the size of controls in the the active panel:

#pragma IndependentModule=MyStuff
#pragma moduleName=MyModule
#pragma version=7   // circa Igor 7
Menu "Panel", dynamic, hideable
    FixedSizeMenu(), /Q, ToggleFixedSizePanel()
    Submenu "Appearance"
        AppearanceMenuItems(), /Q, SetWindowAppearance()
        "-"
        "Set \"_IgorLarge\" fonts", /Q, SetControlFonts(JimsStuff#ActivePanel(), "_IgorLarge")
        "Set \"_IgorMedium\" fonts", /Q, SetControlFonts(JimsStuff#ActivePanel(), "_IgorMedium")
        "Set \"_IgorSmall\" fonts", /Q, SetControlFonts(JimsStuff#ActivePanel(), "_IgorSmall")
        "Set default fonts", /Q, SetControlFonts(JimsStuff#ActivePanel(), "")
        "-"
        Submenu "Popup Menus"
            "Set \"_IgorLarge\" fonts", /Q, SetPopupFonts(JimsStuff#ActivePanel(), "_IgorLarge")
            "Set \"_IgorMedium\" fonts", /Q, SetPopupFonts(JimsStuff#ActivePanel(), "_IgorMedium")
            "Set \"_IgorSmall\" fonts", /Q, SetPopupFonts(JimsStuff#ActivePanel(), "_IgorSmall")
            "Set default fonts", /Q, SetPopupFonts(JimsStuff#ActivePanel(), "")
   


(I extracted this from a larger file, so I hope I didn't leave anything out.)

--Jim Prouty
Software Engineer, WaveMetrics, Inc.


I dont find the key function "setcontrolfonts". can you show me that function?

thanks
wings wrote:

I dont find the key function "setcontrolfonts". can you show me that function?

thanks


My code didn't solve your problem, actually, so I've removed it. I think a PanelResolution option might work if it is in effect before the panel is first built.

--Jim Prouty
Software Engineer, WaveMetrics, Inc.
JimProuty wrote:

My code didn't solve your problem, actually, so I've removed it. I think a PanelResolution option might work if it is in effect before the panel is first built.



Here's a potential solution (it's not perfect because it works by killing and recreating the window without correcting the window top left position).

Still, it may be helpful:

Requires Igor 7 or later.

#pragma TextEncoding = "UTF-8"
#pragma rtGlobals=3     // Use modern global access method and strict wave access.
#pragma ModuleName=PanelSizes
#pragma version=7   // circa Igor 7

#if IgorVersion() >= 7
Menu "Panel", dynamic
    "-"
    Submenu "Size"
        "Make Panel Bigger",/Q, PanelSizes#MakeTopPanelBigger()
        "Make Panel Smaller",/Q, PanelSizes#MakeTopPanelSmaller()
        "Make Panel Normal Size",/Q, PanelSizes#MakeTopPanelNormal()
        "\\M1:(:Panel Resolution = "+num2str(PanelResolution(WinName(0,64)))
        "\\M1:(:Screen Resolution = "+num2str(ScreenResolution)
    End
    "-"
End
#endif

static Function MakeTopPanelBigger()

    String panel= WinName(0,64)
    if( strlen(panel) )
        Variable currentRes= PanelResolution(panel)
        Variable newRes= BiggerResolution(currentRes)
        String newCode= RewritePanelCodeResolution(panel, newRes)
        KillWindow/Z $panel
        Execute/Q/Z newCode
        DoIgorMenu "Control", "Retrieve Window"
    endif  
End

static Function MakeTopPanelSmaller()

    String panel= WinName(0,64)
    if( strlen(panel) )
        Variable currentRes= PanelResolution(panel)
        Variable newRes= SmallerResolution(currentRes)
        String newCode= RewritePanelCodeResolution(panel, newRes)
        KillWindow/Z $panel
        Execute/Q/Z newCode
    endif  
End

static Function MakeTopPanelNormal()

    String panel= WinName(0,64)
    if( strlen(panel) )
        Variable newRes= 1 // This is the default setting in effect when Igor starts.
        String newCode= RewritePanelCodeResolution(panel, newRes)
        KillWindow/Z $panel
        Execute/Q/Z newCode
        DoIgorMenu "Control", "Retrieve Window"
    endif  
End


static StrConstant ksResolutions= "72;96;120;144;192;240;288;384;480;"

static Function BiggerResolution(currentRes)
    Variable currentRes
   
    Variable nextRes= ActualResolution(currentRes)
    String strRes= num2istr(nextRes)
    Variable whichOne = WhichListItem(strRes, ksResolutions)
    Variable numItems= ItemsInList(ksResolutions)
    if( whichOne >= 0 && whichOne < numItems-1)
        nextRes = str2num(StringFromList(whichOne+1, ksResolutions))
    else
        nextRes = str2num(StringFromList(numItems-1, ksResolutions))
    endif
    return nextRes
End

static Function SmallerResolution(currentRes)
    Variable currentRes
   
    Variable nextRes= ActualResolution(currentRes)
    String strRes= num2istr(nextRes)
    Variable whichOne = WhichListItem(strRes, ksResolutions)
    if( whichOne > 0 )
        nextRes = str2num(StringFromList(whichOne-1, ksResolutions))
    else
        nextRes = 72
    endif
    return nextRes
End

static Function ActualResolution(currentRes)
    Variable currentRes

    Variable actualRes= currentRes
    Variable screenRes= ScreenResolution // On Macintosh this was always 72 before Retina displays. On Windows it is usually 96 (small fonts) or 120 (large fonts).
    if( actualRes == 0 ) // points
        actualRes = screenRes
    elseif( actualRes == 1 )
        if( screenRes == 96 )
            actualRes = 72
        else
            actualRes = screenRes
        endif
    endif
    return actualRes
End


static Function/S RewritePanelCodeResolution(panel, newRes)
    String panel
    Variable newRes
   
    String code= WinRecreation(panel, 4)
    Wave/T tw = ListToTextWave(code, "\r")

    // insert three lines of code before line 2 (line 0 is Macro... and line 1 is PauseUpdate...)
    InsertPoints 2,3, tw
    tw[2]= "    SetIgorOption PanelResolution=?"
    tw[3]= "    Variable oldResolution = V_Flag"
    tw[4]= "    SetIgorOption PanelResolution="+num2istr(newRes)


    Variable lines= numpnts(tw)
   
    // insert SetIgorOption PanelResolution=oldResolution
    // before EndMacro (line lines-1)
    InsertPoints lines-1, 1, tw
    tw[lines-1]= "  SetIgorOption PanelResolution=oldResolution"
   
    // convert back to code
    String list
    wfprintf list, "%s\r", tw
   
    return list
End
PanelSizeMenus.ipf (3.65 KB)