Print Page | Close Window

Dropdown not staying dropped

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=9586
Printed Date: 28 September 2024 at 11:06am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Dropdown not staying dropped
Posted By: jcollier
Subject: Dropdown not staying dropped
Date 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!



Replies:
Posted By: Aaron
Date Posted: 14 February 2008 at 2:04pm
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?


Posted By: SuperMario
Date Posted: 14 February 2008 at 2:21pm
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?


Posted By: Aaron
Date Posted: 14 February 2008 at 2:37pm
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


Posted By: jcollier
Date Posted: 14 February 2008 at 2:46pm
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 - uploads/20080214_144611_dropdown.zip



Posted By: Aaron
Date Posted: 14 February 2008 at 3:10pm
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


Posted By: jcollier
Date Posted: 14 February 2008 at 3:38pm
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!


Posted By: Aaron
Date Posted: 14 February 2008 at 3:50pm
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
 


Posted By: Aaron
Date Posted: 14 February 2008 at 3:57pm

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



Posted By: jcollier
Date Posted: 14 February 2008 at 4:35pm
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.


Posted By: SuperMario
Date Posted: 15 February 2008 at 8:51am
Originally posted by jcollier jcollier wrote:

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 - uploads/20080214_144611_dropdown.zip



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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net