Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - To add custom button on title bar of docking pane
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

To add custom button on title bar of docking pane

 Post Reply Post Reply
Author
Message
gagandeep View Drop Down
Newbie
Newbie


Joined: 06 October 2017
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote gagandeep Quote  Post ReplyReply Direct Link To This Post Topic: To add custom button on title bar of docking pane
    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.

Regards
Gagandeep
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post 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
DockingPane\VB.NET\MDISample\frmMain.vb

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
        paneContextMenu.MenuItems.Clear()
        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.

Regards,
 Oleksandr Lebed
Back to Top
gagandeep View Drop Down
Newbie
Newbie


Joined: 06 October 2017
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote gagandeep Quote  Post ReplyReply Direct Link To This Post 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.

Regards,
Gagandeep Kaur
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.500 seconds.