Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Custom tear off popup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Custom tear off popup

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


Joined: 19 November 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote SReedie Quote  Post ReplyReply Direct Link To This Post Topic: Custom tear off popup
    Posted: 19 November 2007 at 7:46am
I have a picture box with some of your slider controls on. I add a popup control and in the InitCommandsPopup event I add this code from your DynamicPopups example:
 
If CommandBar.Title = "3D Chart" Then

        Dim ControlForm As XtremeCommandBars.CommandBarControlCustom
       
        CommandBar.Controls.DeleteAll
        Set ControlForm = CommandBar.Controls.Add(xtpControlCustom, ID_EPOS_CHT_PROPS_3D_CHART_POPUP, "3D Chart")
        ControlForm.Handle = pic3D.hWnd
        CommandBar.SetTearOffPopup "3D Chart", ID_EPOS_CHT_PROPS_3D_CHART, 200

End If
 
the popup displays with the picturebox attached and it can be 'torn off'. The problem is that when I close the floating popup and then redisplay it the picturebox is no longer attached to the popup just a normal command button with the caption 3D Chart. WHat is happening to the picturebox when I close the floating popup?
 
Reedie.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 19 November 2007 at 8:49am
Hi,
CustomControls can't be placed to TearOff popup.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SReedie View Drop Down
Newbie
Newbie


Joined: 19 November 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote SReedie Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2007 at 7:04am
Hi Oleg,
 
I was using a picturebox because I wanted to place slider controls on the toolbar (using your slider control not windows). If I try this:
 
If CommandBar.Title = "3D Chart" Then
        CommandBar.Controls.DeleteAll
        AddButton CommandBar.Controls, xtpControlCustom, ID_EPOS_CHT_PROPS_3D_CHART_POPUP_ELEVATION
        CommandBar.Controls(1).Caption = "&Elevation"
        CommandBar.Controls(1).DescriptionText = "Change the chart elevation"
        CommandBar.Controls(1).ToolTipText = "Elevation"
        CommandBar.Controls(1).Handle = Slider.hWnd
    End If
 
the slider is displayed but it covers the whole commandbar:
 
 
and when I click on it the control is disappearing from the commandbar and becoming visible wherever the control was put on the form at design time:
 
 
Is there any way to attach a slide control to a commandbar and have the caption display as well without it disappearing on a click?
 
Thanks for your help,

Reedie
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2007 at 7:10am
Hi,
 
To fix disappearing please put Slider to picturebox and attach picturebox .
 
actually in 11.2.1 release was added builtin slider for CommandBars.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SReedie View Drop Down
Newbie
Newbie


Joined: 19 November 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote SReedie Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2007 at 8:22am
Hi Oleg,
 
So I have got the newest release and I now have my code like this:
 
If CommandBar.Title = "3D Chart" Then
        Dim ControlSlider As XtremeCommandBars.CommandBarSlider
       
        CommandBar.Controls.DeleteAll
        Set ControlSlider = CommandBar.Controls.Add(xtpControlCustom, ID_EPOS_CHT_PROPS_3D_CHART_POPUP, "3D Chart")
    End If
 
but I am getting a type mismatch error presumably from the control type xtpControlCustom but there is no slider control type (xtpControlSlider) when the enumeration list is displayed after .Add(.
 
Am I missing something?
 
Reedie.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 20 November 2007 at 1:59pm
Hi,
 
Try this code.
 
    Dim ControlSlider As XtremeCommandBars.CommandBarSlider
    Set ControlSlider = CommandBars.CreateCommandBarControl("CXTPControlSlider")
    ControlFile.CommandBar.Controls.AddControl ControlSlider
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SReedie View Drop Down
Newbie
Newbie


Joined: 19 November 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote SReedie Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2007 at 3:52am
Hi Oleg,
 
Excellent, thank you this code works:
 
If CommandBar.Title = "3D Chart" Then
        Dim ControlSlider As XtremeCommandBars.CommandBarSlider
        CommandBar.Controls.DeleteAll
        Set ControlSlider = CommandBars.CreateCommandBarControl("CXTPControlSlider")
        CommandBar.Controls.AddControl ControlSlider
        CommandBar.Controls(1).Caption = "&Elevation"
        CommandBar.Controls(1).DescriptionText = "Set the chart elevation level"
        CommandBar.Controls(1).Style = xtpButtonIcon
        CommandBar.Controls(1).ToolTipText = "Elevation"
        CommandBar.SetTearOffPopup "3D Chart", ID_EPOS_CHT_PROPS_3D_CHART_POPUP, 200
    End If
 
except that setting the caption and style properties don't show on the popup:
 
 
???
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 November 2007 at 9:12am
Yes, its true :( caption is not supported for CommandBarSlider, Sorry.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
SReedie View Drop Down
Newbie
Newbie


Joined: 19 November 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote SReedie Quote  Post ReplyReply Direct Link To This Post Posted: 23 November 2007 at 5:27am
Can the caption be supported for the next release at all?
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.059 seconds.