473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

User control like Dropdown.

If I create a button like control, then I simply can draw button-like
lines on my User Control's surface by getting its Graphics g. If I draw
outside of the control's ClientRectangle (for example, -10,-10,-5,-5),
it is simply cut out.

But what about if I'm trying to make a dropdown list control in .NET?
The dropped down part is outside of the control's ClientRectangle. How
can I do such thing? Maybe create a borderless window and display it?
But that seems to be very slow ( because creating a .NET Form is very
slow) and there's another problem of z-order.

Please advise me. Thank you.

Aug 2 '06 #1
2 1940
Sin Jeong-hun wrote:
If I create a button like control, then I simply can draw button-like
lines on my User Control's surface by getting its Graphics g. If I draw
outside of the control's ClientRectangle (for example, -10,-10,-5,-5),
it is simply cut out.

But what about if I'm trying to make a dropdown list control in .NET?
The dropped down part is outside of the control's ClientRectangle. How
can I do such thing? Maybe create a borderless window and display it?
But that seems to be very slow ( because creating a .NET Form is very
slow) and there's another problem of z-order.

Please advise me. Thank you.
Not a big authority on User Controls, but can you not just extend the
ClientRectangle to the size you require?

Not infront of VS at the moment so can't check.

HTH

Dave
Aug 2 '06 #2
Well, what if it should draw outside of even the form? As you see, real
dropdown list expands to the outside of the form which it is on.
Expanding the control's size will be OK if there is no other controls
on the form and the form is empty. But what about another control is
near and that control is added later than my control? Expanding my
control will make it draw itself under the control, I think.
David Gouge wrote:
Sin Jeong-hun wrote:
If I create a button like control, then I simply can draw button-like
lines on my User Control's surface by getting its Graphics g. If I draw
outside of the control's ClientRectangle (for example, -10,-10,-5,-5),
it is simply cut out.

But what about if I'm trying to make a dropdown list control in .NET?
The dropped down part is outside of the control's ClientRectangle. How
can I do such thing? Maybe create a borderless window and display it?
But that seems to be very slow ( because creating a .NET Form is very
slow) and there's another problem of z-order.

Please advise me. Thank you.

Not a big authority on User Controls, but can you not just extend the
ClientRectangle to the size you require?

Not infront of VS at the moment so can't check.

HTH

Dave
Aug 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Tim T | last post by:
Hi, I have the need to use dynamically loaded user controls in a webform page. I have the controls loading dynamically, and that part works fine. this is the code used in a webform to dynamically...
1
by: Shourie | last post by:
I've noticed that none of the child controls events are firing for the first time from the dynamic user control. Here is the event cycle. 1) MainPage_load 2) User control1_Load user clicks a...
3
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the...
0
by: ab_j | last post by:
I have a user control that contains a dropdown which I want to use as a menu on multiple .aspx pages. Basically, all I am trying to do is pass the selected value of the dropdown in the user...
3
by: Moojjoo | last post by:
I created an user control (.ascx file) with a DropDownList (DDL) with the following code behide: public string Selected_dept_value() { string dept_value = dept_dropdown.SelectedValue; return...
7
by: dickson.matt | last post by:
Ok simple question (that I feel dumb for asking).... I have created a user control (ascx page) that contains a dropdown list. The problem I am having is that when the postback occurs I can...
9
by: Sridhar | last post by:
Hi, I have created a web page which includes a place holder. I also have a dropdown list in that webpage. when I select one of the choices in that dropdown list, It will load a user control...
2
by: Brenden Bixler | last post by:
I have a user control, dropdown.ascx Inside dropdown.ascx, I have a dropdownlist control. From my page.aspx, I need to be able to access the dropdown's value. By setting it to auto-post...
3
by: alsu50 | last post by:
Hello All, I have a user control which has an ASP.Net dropdown, gets filled up from database, and is supposed to open a document when the selected index is changed. The control itself is usually...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.