Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5   10.6    Statistic    FMM    Blog  

TouchBar.AssignToApp

Assigns the TouchBar to be the main one for current app.

Component Version macOS Windows Linux Server FileMaker iOS SDK
TouchBar 6.5 Yes No No No No
MBS( "TouchBar.AssignToApp"; TouchBarRef )   More

Parameters

Parameter Description Example
TouchBarRef The reference number for the touch bar. $TouchBar

Result

Returns OK or error.

Description

Assigns the TouchBar to be the main one for current app.

Examples

Build App TouchBar:

#Create a new TouchBar
Set Variable [$t; Value:MBS( "TouchBar.Create" )]
#Add two buttons
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "AddRecord"; ""; "NSImageNameTouchBarAddTemplate"; "Add"; 0; Get(FileName); "AddRecordTouchBar" )]
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "DeleteRecord"; ""; "NSImageNameTouchBarDeleteTemplate"; "Delete"; 0; Get(FileName); "DeleteRecordTouchBar" )]
Set Variable [$r; Value:MBS( "TouchBar.AddButton"; $t; "InfoButton"; ""; TouchBar::MBS; "Info"; 0; Get(FileName); "InfoTouchBar" )]
#Set which button show by default:
Set Variable [$r; Value:MBS( "TouchBar.SetDefaultItemIdentifiers"; $t; "AddRecord¶InfoButton¶NSTouchBarItemIdentifierOtherItemsProxy")]
#Set the primary button:
Set Variable [$r; Value:MBS( "TouchBar.SetPrincipalItemIdentifier"; $t; "AddRecord" )]
#Set which buttons can be configured:
Set Variable [$r; Value:MBS( "TouchBar.SetCustomizationAllowedItemIdentifiers"; $t; "AddRecord¶InfoButton¶DeleteRecord")]
#Set this touch bar to be the app one:
Set Variable [$r; Value:MBS( "TouchBar.AssignToApp"; $t )]

See also

Example Databases

Created 1st November 2016, last changed 3th November 2016


TouchBar.AddButton   -   TouchBar.AssignToWindow

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins

Start Chat