Print Page | Close Window

To add custom button on title bar of docking pane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
Printed Date: 19 September 2019 at 12:48am

Topic: To add custom button on title bar of docking pane
Posted By: gagandeep
Subject: To add custom button on title bar of docking pane
Date Posted: 06 October 2017 at 6:03am
Hey there,

I am using your ActiveX components and need to ask is there any way to add custom button on the top left of title bar of Docking Pane near the "X" close buttons and a click event to handle it.

or if that is not possible,

then is there any way by which i can change the icon of DropDown arrow which comes near "X" close button. i get its click event but i need to change its icon by custom icon.

I have been tiring very hard for the past few days to find a solution for it.

Your help would be appreciated.


Posted By: olebed
Date Posted: 07 October 2017 at 1:37pm
Hello Gagandeep,

These buttons are hardcoded. You can add your custom buttons to context menu of title. See our .NET  sample

C = MDIDockingPaneManager.CreatePane(5, 200, 120, DockingDirection.DockLeftOf, B)
C.Title = "Pane 5 - Menu Button"
C.Options = XtremeDockingPane.PaneOptions.PaneHasMenuButton

Private Sub MDIDockingPaneManager_PanePopupMenu(ByVal sender As Object, ByVal e As AxXtremeDockingPane._DDockingPaneEvents_PanePopupMenuEvent) Handles MDIDockingPaneManager.PanePopupMenu
    If e.pane.Id = 5 OrElse e.pane.Id = 2 Then
        Dim newItem As System.Windows.Forms.MenuItem
        Dim x As Integer
        For x = 0 To 14
            newItem = New System.Windows.Forms.MenuItem(MyColor(x).ToString())
            AddHandler newItem.Click, AddressOf mnuPanePopupItem_Click
            paneContextMenu.MenuItems.Add(x, newItem)
            If arrPanes(MDIDockingPaneManager.ActivePane.Id - 1).rtfTextBox.BackColor.Equals(MyColor(x)) Then
                newItem.Checked = True
            End If
        Next x
        paneContextMenu.Show(Me, New Point(e.x - Me.Left - 4, e.y - Me.Top - MDIDockingPaneManager.Top + 6))
    End If
End Sub

The buttons are drawn by graphic primitives (symbols) which defined in codejock's font.  You can change this maybe only if use C++ version of library.

 Oleksandr Lebed

Posted By: gagandeep
Date Posted: 09 October 2017 at 5:07am
Hey there,

I don't need the custom buttons in the context menu, i need them on the title bar only like the "X" Close button or pin button comes.
I am using ActiveX components (C#), so if it is possible please provide with a solution.
And if not,
then a way to change the icon of the DropDown arrow which comes near "X" close button.

Please give some solution or workaround to it.

Gagandeep Kaur

Print Page | Close Window