c4d.gui.TreeViewCustomGui

New in version R13.029.

The tree view GUI ( CUSTOMGUI_TREEVIEW ) is a very versatile list view interface.

It looks like this:

../../../../_images/treeview.png

The settings are:

TREEVIEW_BORDER int Border mode:
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_MASK Masks out border type.
BORDER_WITH_TITLE_BOLD Display group title with bold font.
BORDER_WITH_TITLE Display group title in the border.
TREEVIEW_OUTSIDE_DROP bool True if an object may be dropped under all the objects in the tree view.
TREEVIEW_HIDE_LINES bool True if no lines should be drawn.
TREEVIEW_CTRL_DRAG bool True if item may be duplicated by Ctrl + Drag.
TREEVIEW_NO_MULTISELECT bool True if no multiple selection is allowed.
TREEVIEW_HAS_HEADER bool True if the tree view may have a header line.
TREEVIEW_RESIZE_HEADER bool True if the column width can be changed by the user.
TREEVIEW_MOVE_COLUMN bool True if the user can move the columns.
TREEVIEW_FIXED_LAYOUT bool True if all lines have the same height.
TREEVIEW_NO_OPEN_CTRLCLK bool True if it is not allowed to open the complete tree with Ctrl + Click.
TREEVIEW_ALT_DRAG bool True if Alt should be used instead of Ctrl for drag and drop.; implies item may be duplicated by Alt + Drag.
TREEVIEW_NO_BACK_DELET bool Disable “delete pressed” messages if backspace was hit.
TREEVIEW_ALTERNATE_BG bool Alternate background per line.
TREEVIEW_NOAUTOCOLUMNS bool True if only the first line is asked for the columnswidth, resulting in a huge speedup.
TREEVIEW_CURSORKEYS bool True if cursor keys should be processed. Note : The focus item has to be set to None if you delete it and this flag is set.
TREEVIEW_NOENTERRENAME bool Suppresses the rename popup when the user presses enter.

Definition

class c4d.gui. TreeViewCustomGui

Inheritance

Members

TreeViewCustomGui. SetRoot ( root , functions , userdata )

Initializes the tree.

Parameters:
Return type:

bool

Returns:

True if successful, otherwise False .

TreeViewCustomGui. SetLayout ( columns , data )

Sets the layout for the tree view.

Parameters:
Return type:

bool

Returns:

True if successful, otherwise False .

TreeViewCustomGui. Refresh ( )

Refreshes the tree view.

TreeViewCustomGui. SetHeaderText ( lColumnID , str )

Set the header text for a column.

Parameters:
  • lColumnID ( int ) – Column index.
  • str ( str ) – Header text.
Return type:

bool

Returns:

True if successful, otherwise False .

TreeViewCustomGui. MakeVisible ( pObj )

Scrolls to pObj and expands the tree if necessary.

Parameters: pObj ( any ) – The object to scroll to.
Return type: bool
Returns: True if successful, otherwise False .
TreeViewCustomGui. ShowObject ( pObj )

Expands the tree to pObj .

Parameters: pObj ( any ) – The object to expand to.
Return type: bool
Returns: True if successful, otherwise False .
TreeViewCustomGui. GetVisibleScrollArea ( )

New in version R17.048.

Queries the internal scroll group for its currently visible region.

Return type: tuple(int,int,int,int)
Returns: The X and Y coordinates of the top/bottom left/right visible corner: tuple(x1,y1,x2,y2).
TreeViewCustomGui. SetVisibleScrollArea ( x1 , y1 , x2 , y2 )

New in version R18.020.

Sets the internal scroll group currently visible region, a rectangle between ( x1 , y1 ) and ( x2 , y2 ).

Parameters:
  • x1 ( int ) – The left X value.
  • y1 ( int ) – The top Y value.
  • x2 ( int ) – The right X value.
  • y2 ( int ) – The bottom Y value.
Return type:

bool

Returns:

True if successful, otherwise False .

TreeViewCustomGui. GetVisibleLineCount ( )

New in version R17.048.

Gets the number of currently visible lines related to folded and unfolded items of the tree.

Return type: int
Returns: The number of visible lines.
TreeViewCustomGui. SetFocusItem ( pItem )

Sets the focus item.

Parameters: pItem ( any ) – The new focus item.
TreeViewCustomGui. IsFocusItem ( pItem )

Checks if pItem is the focus item.

Parameters: pItem ( any ) – The item to check.
Return type: bool
Returns: True if pItem is the focus item, otherwise False .

Table Of Contents