Dropdown not staying dropped |
Post Reply |
Author | |
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
Posted: 14 February 2008 at 10:05am |
I have a form (not a mdi child). On the form is a Frame. In the frame is a dropdown with x number of values. When I load the form into a DockingPane, the dropdown won't stay down and allow me to choose a value. I've tried putting the dropdown directly on the form (outside the Frame). I've tried putting the dropdown in a picturebox. I've tried putting the frame in a picturebox. All attempts were unsuccessful.
In a related item, the checkboxes that are also in the Frame are not checkable. I click them but nothing happens. Hopefully the fix is simple. Anyone? Thanks! |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
If you load the form without attaching it to a pane, what happens then? Does it work correctly? Yes? and how do you attach the form to the pane?
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
As a test I used the SDI Docking Pane sample and added both MS and Codejock checkbox and dropdown controls to the form. Both seem to work. Can you reproduce it with a Codejock sample? If so, can you attach it here?
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
No can't reproduce it, but I would like to know the code you use to attach the pane to that form. Can you send me the form and the few lines of code you use to attach the pane? doesn't matter anymore, now Super Mario comes in action
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Actually, I recreated my situation in a new project with everything stripped down. VB6 with CJ 11.2.2
This project is just as I have mine set up. MDI Parent loads mdi child which attaches form to pane. uploads/20080214_144611_dropdown.zip |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
It's a little difficult to explain. But I will give it a try.
The container for your app is the MDIForm and the dockingpane will be the container for all the attached panes, right? So you have to place the Dockingpane in the MDIForm and attach the form that you need into a pane, which DockingPane will resize into you MDIForm the proper way. Not in a way you did.
Put this in your MDIForm code and drag a DockingPane on the MDIForm
I copied your code into the MDIForm and the only thing I changed was the Load event in MDIForm
Option Explicit
Private Sub DockingPane1_AttachPane(ByVal Item As XtremeDockingPane.IPane)
Dim frmForm2 As Form2
Set frmForm2 = New Form2 Item.Handle = frmForm2.hWnd End Sub Private Sub CreateDashboard() Dim paneForm2 As Pane
Set paneForm2 = DockingPane1.CreatePane(1, 100, 100, DockTopOf, Nothing) paneForm2.Title = "Messages" ''paneForm2.Options = PaneNoFloatable + PaneNoCloseable + PaneNoHideable DockingPane1.VisualTheme = ThemeOffice2007 DockingPane1.Options.HideClient = True DockingPane1.TabPaintManager.ClientFrame = xtpTabFrameNone End Sub Private Sub MDIForm_Load()
Call CreateDashboard End Sub This will show a pane with the combobox on it and this combobox drops down as we want to.
And another thing: set MDIChild to false
And clear all code in Form1
|
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Cool. Now the curveball. Let's say I have a button on Form2 that just loads and shows form1. How do I make the pane go to the background? As it is now, Form2 loads and shows but it "shows" behind the pane and I can't see Form2.
Sorry for all the questions but I appreciate the help! |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Do you want to close the pane? or temporary hide the pane?
You can auto hide the pane by docking it and clicking on the pin button
Close the pane like this:
Dim pan As XtremeDockingPane.Pane
Set pan = MDIForm1.DockingPane1.FindPane(1) ''ID of pane pan.Close |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi, Are you going to build a MDI application? There's a MDI sample present, you better take a look at that and post a little here and there, pulling out hair, but there's an example present |
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Actually, I would like it to just kinda be the background of the mdi parent and automatically be visible when no other mdi children are open.
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
The problem is with Focus. The MDIChild doesn't have any control on it. VB wants a control on the MDIChild, it needs some control on it to have focus. This is just a bug in VB. So it would be better to move your Frame over to Form1 and remove Form2. |
|
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 |