c4d.gui.BitmapButtonCustomGui¶
-
class
c4d.gui.
BitmapButtonCustomGui
¶ Bitmap button custom GUI (CUSTOMGUI_BITMAPBUTTON). The settings are:
BITMAPBUTTON_BORDER int Border type used for the pressed button state if BITMAPBUTTON_OUTBORDER is set: BORDER_NONE No border. BORDER_THIN_IN Thin border inward. BORDER_THIN_OUT Thin border outward. BORDER_IN Normal border inward. BORDER_OUT Normal border outward. BORDER_GROUP_IN Group border inside. BORDER_GROUP_OUT Group border outside. BORDER_OUT2 Outward border 2. BORDER_OUT3 Outward border 3 BORDER_BLACK Thin black line. BORDER_ACTIVE_1 Active border 1. BORDER_ACTIVE_2 Active border 2. BORDER_ACTIVE_3 Active border 3. BORDER_ACTIVE_4 Active border 4. BORDER_GROUP_TOP Border along the top. BORDER_ROUND Border with round corners. BORDER_SCHEME_EDIT Edit field border like the shortcut gadget for example. BORDER_SCHEME_EDIT_NUMERIC Edit field border that is open to the right like the link field for example. BORDER_OUT3l Outward border 3, open to the left. BORDER_OUT3r Outward border 3, open to the right. BORDER_THIN_INb Thin border inward, open to the botton. BORDER_MASK Masks out border type. BORDER_TEXT_DOTTED New in version R21:Only used withGeDialog.AddStaticText()
.Draws a dotted line at right of text, useful to visually connect the text with its parameter.BORDER_WITH_TITLE_MONO Display group title with monospaced font. BORDER_WITH_TITLE_BOLD Display group title with bold font. BORDER_WITH_TITLE Display group title in the border. BITMAPBUTTON_BUTTON bool Clickable button. To detect when the button is pressed in a description check if the DESCFLAGS_SET_USERINTERACTION flag is set in the NodeData.SetDParameter()
call.BITMAPBUTTON_TOGGLE bool Toggle button, like a checkbox. BITMAPBUTTON_IGNORE_BITMAP_WIDTH bool Ignore bitmap width. BITMAPBUTTON_IGNORE_BITMAP_HEIGHT bool Ignore bitmap height. BITMAPBUTTON_DRAWPOPUPBUTTON bool Draw popup button. BITMAPBUTTON_TOOLTIP str Tooltip string. Only works if BITMAPBUTTON_BUTTON is True. BITMAPBUTTON_ICONID1 int Registered icon bitmap ID. On state for toggle buttons. BITMAPBUTTON_ICONID2 int Registered icon bitmap ID. Off state for toggle buttons. BITMAPBUTTON_FORCE_SIZE int Private. BITMAPBUTTON_SPECIAL bool Private. BITMAPBUTTON_NOBORDERDRAW bool Disable border drawing. BITMAPBUTTON_OUTBORDER int Out border type used if BITMAPBUTTON_BUTTON is True: BORDER_NONE No border. BORDER_THIN_IN Thin border inward. BORDER_THIN_OUT Thin border outward. BORDER_IN Normal border inward. BORDER_OUT Normal border outward. BORDER_GROUP_IN Group border inside. BORDER_GROUP_OUT Group border outside. BORDER_OUT2 Outward border 2. BORDER_OUT3 Outward border 3 BORDER_BLACK Thin black line. BORDER_ACTIVE_1 Active border 1. BORDER_ACTIVE_2 Active border 2. BORDER_ACTIVE_3 Active border 3. BORDER_ACTIVE_4 Active border 4. BORDER_GROUP_TOP Border along the top. BORDER_ROUND Border with round corners. BORDER_SCHEME_EDIT Edit field border like the shortcut gadget for example. BORDER_SCHEME_EDIT_NUMERIC Edit field border that is open to the right like the link field for example. BORDER_OUT3l Outward border 3, open to the left. BORDER_OUT3r Outward border 3, open to the right. BORDER_THIN_INb Thin border inward, open to the botton. BORDER_MASK Masks out border type. BORDER_TEXT_DOTTED New in version R21:Only used withGeDialog.AddStaticText()
.Draws a dotted line at right of text, useful to visually connect the text with its parameter.BORDER_WITH_TITLE_MONO Display group title with monospaced font. BORDER_WITH_TITLE_BOLD Display group title with bold font. BORDER_WITH_TITLE Display group title in the border. BITMAPBUTTON_BACKCOLOR int Background color. See COLOR constants. BITMAPBUTTON_MIRROR bool Mirror the button in an Arabic interface. BITMAPBUTTON_STRING str New in version R20: Adds a string in bold font at left of the icon.
Note
To format the bitmap’s button tooltip text (BITMAPBUTTON_TOOLTIP) use the <b> and <br> HTML tags.For instance this is used internally to format the tooltip text for the palettes buttons.For example.
bc.SetString(c4d.BITMAPBUTTON_TOOLTIP, "<b>Bold Text</b><br>New line")
Methods Signatures
BitmapButtonCustomGui.SetImage(self, obj[, copybmp, ...]) |
Sets the image. |
BitmapButtonCustomGui.SetToggleState(self, set) |
Sets the toggle state of the button. |
BitmapButtonCustomGui.SetCommandDragId(self, cmdid) |
Sets a command ID for the bitmap button.
|
Inheritance
Inheritance
Parent Class:
Methods Documentation
-
BitmapButtonCustomGui.
SetImage
(self, obj, copybmp=True, secondstate=False)¶ Sets the image.
Parameters: - obj (Union[str, c4d.bitmaps.BaseBitmap, dict, c4d.IconData]) –
The filename, bitmap or icon to load the image from.
Changed in version 21:
c4d.IconData
is now supported. - copybmp (bool) – If this is True the bitmap is copied.
- secondstate (bool) – If this is True the function stores a second state for toggle and clickable buttons.
Return type: bool
Returns: True if successful, otherwise False.
- obj (Union[str, c4d.bitmaps.BaseBitmap, dict, c4d.IconData]) –
-
BitmapButtonCustomGui.
SetToggleState
(self, set)¶ Sets the toggle state of the button.
Parameters: set (bool) – New toggle state.
-
BitmapButtonCustomGui.
SetCommandDragId
(self, cmdid)¶ - Sets a command ID for the bitmap button.This enables drag and drop of the command into tool bars and menu manager. Used e.g. in the script manager.
Parameters: cmdid (int) – The ID of the command.