![]() |
Custom tear off popup |
Post Reply ![]() |
Author | |
SReedie ![]() Newbie ![]() Joined: 19 November 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() 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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
CustomControls can't be placed to TearOff popup.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
SReedie ![]() Newbie ![]() Joined: 19 November 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
SReedie ![]() Newbie ![]() Joined: 19 November 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
SReedie ![]() Newbie ![]() Joined: 19 November 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
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:
![]() ???
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Yes, its true :( caption is not supported for CommandBarSlider, Sorry.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
SReedie ![]() Newbie ![]() Joined: 19 November 2007 Status: Offline Points: 8 |
![]() ![]() ![]() ![]() ![]() |
Can the caption be supported for the next release at all?
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |