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. 2 1954
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
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
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 load one of several controls:
private void btnCategory_Click(object sender, System.EventArgs e)
{
Control myControl = LoadControl(DropDownList1.SelectedItem.Text +
".ascx");
PlaceHolder1.Controls.Add(myControl);
|
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 dropdown in UC1
_________________________
1) MainPage_Load
2) User Control_1 Load
|
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 particular site that they would
like to edit. The second would allow the user to select which admin screen
they would like to edit. The second dropdown needs to be populated based on
the selection in the first one. I want to encapsulate these...
|
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 control to the main
..aspx page.
In an attempt to make it more clear on what I am talking about, here is
the order of events in page life cycle (from
http://www.dotnetspider.com/technology/KBPages/789.aspx)
..ascx - OnInit()
..ascx - Page_Init()
|
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 dept_value;
}
All the values were added via the visual interface.
| |
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 only
read the selected value from the dropdown list that was originally
selected. I can't read the current selected value of the control...
For example, the dropdown has values for Apples and Oranges. When the
|
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 into the place holder. This is
done dynamically based on the choice they selected. This user control has a
datagrid in it that supports paging. When I click on the next or prev buttons
of the datagrid in a user control it should display the next page...
|
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 back, I am able to grab this value using
Request.Form. This worked well until I realized that I
needed the initial value in some cases. How do I access this value from the
page.aspx file?
|
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 nested within a
container on the page.
IE7 treats the act of opening the document from the dropdown as the
popup and blocks it. I do the opening using javascript:
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |