Solved

How can I draw a control over two panels

Posted on 2004-04-28
8
177 Views
Last Modified: 2012-05-04
I have a user control which consists of a  combobox that when its button is pressed i present a listview directly underneath it. When placed inside a panel the listview goes over the bottom edge of the panel and dissapears. I can see that the combobox lisrt if pressed near the bottom edge of the panel has no problem showing over the panel edge.

How can this be done with my control? What I really want to end-up with is a multi-collumn combobox.

Thanks
0
Comment
Question by:pallmall77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 2

Expert Comment

by:Jeffr0
ID: 10940514
0
 
LVL 2

Expert Comment

by:Jeffr0
ID: 10940667
It sounds like the User Control is only showing items that are within the it's coordinates.

You may have to stretch it out some to see all of the controls that are inside of it.  Of course, you probably want the button to be right under it for some reason....   Hmmm....  Maybe you can make sure that the UserControl is "Brought to the Front" so that it is on top of the button.  When you've got your dropdown's open, you can make sure that the size of the UserControl is expanded.  When an item is selected you could shrink it back-- that way the button isn't obscured _all_ the time.

This is my guess without building a test case.
0
 
LVL 2

Expert Comment

by:Jeffr0
ID: 10940781
Yes.  It does work.

Here's the code I used:

 Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.UserControl11.Size = New System.Drawing.Size(168, 121)
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Me.UserControl11.Size = New System.Drawing.Size(168, 40)
    End Sub

My UserControl Has additional controls that are obscurred when he's small.  I right-clicked him and selected "Bring to Front" to ensure that he was on top of any surrounding controls when he expanded.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 2

Expert Comment

by:Jeffr0
ID: 10940839
The only thing I see that I may have missed is in regard to the "panels" you mentioned.  If I've failed to address your problem, please clarify how you are using them and how they affect this situation.
0
 

Author Comment

by:pallmall77
ID: 10946683
Imagine you have two panels docked top so one is underneath the other. Say that the top panel is your buttons and search criteria panel and the bottom contains a datagrid. The top panels takes all the screen in width (i.e. docked top) but has a small height. If you put a combobox on that panel and press its button the list that opens underneath spans over the panel which is docked underneath.

In my control since I just position a listview underneath my combobox (i.e. trying to pretend to the user that the listview is part of the combobox) what happens is that the listview dissapears behind the docked panel below. Even if I say bringtofront it does nothing.

I will check the link you sent me on the multi-combo and get back to you. if you have any ideas on how to make my control work go ahead.

Thanks a lot

0
 

Author Comment

by:pallmall77
ID: 10946969
I tried the link but it is a VS-2003 project. I tried converting it but It didint convert right and I am getting errors
Is there a multi collumn combobox like that for VS-2002?


0
 
LVL 2

Accepted Solution

by:
Jeffr0 earned 500 total points
ID: 10948383
To make the code work, first go here:

http://www.codeproject.com/macro/vsconvert.asp

1)  Download and unzip the "Working Application."

2)  Run the exe.  Click add files and select all of the files in all of the folders of the Multi-column combo project.

3)  Click "To VS 7.0"

4)  Now double click the Combo Project to open it.

5)  There is a minor change to make-- you'll see the syntax errors in the Task List.  Double click one of the errors to get to it.  Change the faulty line ("For i As Integer = 0 To 100") to this:

Dim i As Integer
For i = 0 To 100

6)  Hit F5 and check it out!!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question