tablabel is forced(?) center aligned relative to the table frame
renyj
#pragma TextEncoding = "UTF-8"
#pragma rtGlobals=3 // Use modern global access method and strict wave access
#pragma DefaultTab={3,20,4} // Set default tab width in Igor Pro 9 and later
Function test()
newpanel/n=testname as "new_panel"
tabcontrol tabtest pos={20,20}, size={200,100}
tabcontrol tabtest tabLabel(0)="first"
tabcontrol tabtest tabLabel(1)="second"
End
#pragma rtGlobals=3 // Use modern global access method and strict wave access
#pragma DefaultTab={3,20,4} // Set default tab width in Igor Pro 9 and later
Function test()
newpanel/n=testname as "new_panel"
tabcontrol tabtest pos={20,20}, size={200,100}
tabcontrol tabtest tabLabel(0)="first"
tabcontrol tabtest tabLabel(1)="second"
End
Above is a simple test code. The outputs on Windows and Mac are different. On Mac, tablabel is center aligned but left aligned on Windows.
I didn't find a way to set this alignment. Is there anyway to make tablabel left aligned?
Igor draws controls using native platform appearance by default, and the two platforms have different ideas about how tab controls should be aligned. You can likely use the TabControl appearance keyword if you want the control to use the same appearance on all platforms, at the expense of making the TabControl look non-native on one or both platforms.
December 24, 2023 at 09:59 am - Permalink