Multiple lines in tab labels
I have a tab control with long labels for the tabs, and I'd like to have the labels split over two lines to save space. However, while I can use carriage returns or newlines in the commands to make the tab, I will get an error when I try to recreate the experiment, since the \r is being interpreted literally and puts carriage return in the command used to recreate the panel.
Window Panel_One_Backslash() : Panel //Runs fine, but the created panel will cause errors the next time you open Igor
PauseUpdate; Silent 1 // building window...
NewPanel /W=(150,269,623,536)
TabControl tab0,pos={29.00,21.00},size={424.00,227.00}
TabControl tab0,tabLabel(0)="Dataset\rheader"
TabControl tab0,tabLabel(1)="§1 Overview\rquality"
TabControl tab0,value=0
EndMacro
//Macro when you do Ctrl+Y on the panel. Note the broken lines for the tab labels.
Window Panel_One_Backslash_Recreation_Macro() : Panel
PauseUpdate; Silent 1 // building window...
NewPanel /W=(150,570,623,837)
TabControl tab0,pos={29.00,21.00},size={424.00,227.00}
TabControl tab0,tabLabel(0)="Dataset
header",tabLabel(1)="§1 Overview
quality"
TabControl tab0,value=0
EndMacroIf I use \\r, the label only has one line, but will have
I was able to hack it by using Igor Tex, but it took a little fiddling to make it look halfway decent.
Window Panel_Igor_Tex() : Panel
PauseUpdate; Silent 1 // building window...
NewPanel /W=(150,269,623,536)
TabControl tab0,pos={29.00,21.00},size={424.00,227.00}
TabControl tab0,tabLabel(0)="\JC\Z18\$WMTEX$^{\,\Dataset\,}_{\,\header\,}\$/WMTEX$"
TabControl tab0,tabLabel(1)="\JC\Z18\$WMTEX$^{\,§1\,\Overview\,&\,}_{\,\,\quality\,}\$/WMTEX$"
TabControl tab0,value=0
EndMacroIs there another way to accomplish this? You can have carriage returns in the titles of other controls, like checkboxs, so it would be nice if you can also have carriage returns in the labels for tabs.
I agree that this isn't behaving like it should. I think I've found where the problem is, so I'll put it in for a fix.
August 7, 2026 at 02:34 pm - Permalink
Excellent, thanks!
August 7, 2026 at 05:24 pm - Permalink