![]() |
Custom tear off popup |
Post Reply
|
| Author | |
SReedie
Newbie
Joined: 19 November 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
Topic: Custom tear off popupPosted: 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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 November 2007 at 8:49am |
|
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 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
SReedie
Newbie
Joined: 19 November 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
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.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
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 |
|
![]() |
|
SReedie
Newbie
Joined: 19 November 2007 Status: Offline Points: 8 |
Post Options
Thanks(0)
Quote Reply
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:
![]() ???
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 21 November 2007 at 9:12am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 23 November 2007 at 5:27am |
|
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 |