SolidWorksMakroprogrammierung

Enumeration · SwConst

swCommandTabButtonTextDisplay_e-Enumeration

Ob und wo eine Schaltfläche auf einer CommandManager-Registerkarte ihren Text zeigt. Wird bei Flyouts mit swCommandTabButtonFlyoutStyle_e verknüpft.

Bibliothek SwConst · 3 Werte · im Code direkt mit Namen verwendbar, zum Beispiel swCommandTabButton_NoText

Syntax

Enum swCommandTabButtonTextDisplay_e
    swCommandTabButton_NoText         = 1
    swCommandTabButton_TextBelow      = 2
    swCommandTabButton_TextHorizontal = 4
End Enum

Werte

KonstanteWertBedeutung
swCommandTabButton_NoText1Nur das Symbol, ohne Text.
swCommandTabButton_TextBelow2Text unter dem Symbol.
swCommandTabButton_TextHorizontal4Text neben dem Symbol.

Beispiel

' swTabBox ist eine CommandTabBox, etwa aus CommandTab.AddCommandTabBox.
' swCmdGroup ist eine aktivierte CommandGroup, nIdx0 und nIdx1 von AddCommandItem2.
Dim vIDs(1) As Long, vStile(1) As Long
Dim bOk As Boolean
vIDs(0) = swCmdGroup.CommandID(nIdx0)
vIDs(1) = swCmdGroup.CommandID(nIdx1)
vStile(0) = swCommandTabButton_TextHorizontal
vStile(1) = swCommandTabButton_TextHorizontal
bOk = swTabBox.AddCommands(vIDs, vStile)

Bemerkungen

CommandTabBox.AddCommands erwartet je Schaltfläche einen Wert im Array TextDisplayStyles, passend zum Array der Befehls-IDs. CommandTabBox.GetCommands liefert beide Arrays zurück.

Die Werte sind eine Bitmaske. Für eine Flyout-Gruppe verknüpfst du den Wert mit Or mit einem Wert aus swCommandTabButtonFlyoutStyle_e. Ob ein Wert gesetzt ist, prüfst du mit And.

Verwendet von

Siehe auch

Englisches Original: swCommandTabButtonTextDisplay_e in der SOLIDWORKS API-Hilfe ↗

Fragen zu diesem Befehl oder ein Befehl fehlt? Frag im Discord.