473,401 Members | 2,125 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,401 software developers and data experts.

Windows Application: Drawing control over boundaries?

Ty
Hi all

following scenario: i have a usercontrol with a search-textbox who
opens a datagrid to show filtered records. unfortunatly this datagrid
is limited to the boundaries of the usercontrol wich limits the height
to some 4 records. (i know i could use a normal dropdowncontrol, but
this is not good enough for some reasons).
right now i've solved it by opening a new borderless form wich is
aligned to the search-textbox. needless to say, this approach is
difficult to handle because this dumy-form is somewhat disconnected to
the searchtextbox.

in general, is it possible to draw a control or usercontrol somewhere
outside it's containers boundaries, somewhere on the screen?

Thank You!
Nov 19 '08 #1
2 3411
On Wed, 19 Nov 2008 00:50:17 -0800, Ty <ty********@gmail.comwrote:
Hi all

following scenario: i have a usercontrol with a search-textbox who
opens a datagrid to show filtered records. unfortunatly this datagrid
is limited to the boundaries of the usercontrol wich limits the height
to some 4 records. (i know i could use a normal dropdowncontrol, but
this is not good enough for some reasons).
right now i've solved it by opening a new borderless form wich is
aligned to the search-textbox. needless to say, this approach is
difficult to handle because this dumy-form is somewhat disconnected to
the searchtextbox.

in general, is it possible to draw a control or usercontrol somewhere
outside it's containers boundaries, somewhere on the screen?
Define "draw". You certainly can place the control in that way. And you
can draw the control in the sense that the display code responsible for
rendering the control can execute normally.

But if you mean "can the control actually be _visible_ outside the parent
container", the answer is generally no. The child control is clipped to
the parent.

One option would be to set the AutoScroll property of the UserControl to
"true", so that at least the user could scroll to see all of the DataGrid.

Another alternative would be to not display the DataGrid inside the
UserControl itself. You could either do it the way you're doing it now,
or just abandon the idea of having the DataGrid physically connected to
the TextBox and show it as a modeless dialog or something like that.

Pete
Nov 19 '08 #2
Ty
On 19 Nov., 11:33, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Wed, 19 Nov 2008 00:50:17 -0800, Ty <tylersh...@gmail.comwrote:
Hi all
following scenario: i have a usercontrol with a search-textbox who
opens a datagrid to show filtered records. unfortunatly this datagrid
is limited to the boundaries of the usercontrol wich limits the height
to some 4 records. (i know i could use a normal dropdowncontrol, but
this is not good enough for some reasons).
right now i've solved it by opening a new borderless form wich is
aligned to the search-textbox. needless to say, this approach is
difficult to handle because this dumy-form is somewhat disconnected to
the searchtextbox.
in general, is it possible to draw a control or usercontrol somewhere
outside it's containers boundaries, somewhere on the screen?

Define "draw". *You certainly can place the control in that way. *Andyou *
can draw the control in the sense that the display code responsible for *
rendering the control can execute normally.

But if you mean "can the control actually be _visible_ outside the parent*
container", the answer is generally no. *The child control is clipped to *
the parent.

One option would be to set the AutoScroll property of the UserControl to *
"true", so that at least the user could scroll to see all of the DataGrid..

Another alternative would be to not display the DataGrid inside the *
UserControl itself. *You could either do it the way you're doing it now, *
or just abandon the idea of having the DataGrid physically connected to *
the TextBox and show it as a modeless dialog or something like that.

Pete

Thanks Pete

i wanted to know if there are better options out there, so "no" as an
answer is also good ;). right now im showing it as borderless form.
but there's a lot of event handling that has to go on (if form
resizes, moves, application loses focus etc etc).
the other thing i could do is showing the grid on the parent form of
the usercontrol, easier to handle. disadvantage is that i'm limited to
the form borders, whereas a combobox can show it's list over the
formborders. from a user standpoint it would really be better to have
it as big as neccessary, and i hate to make compromises for technical
reasons...

oh well :)

solutions still welcome

thanks and have a nice day
Nov 20 '08 #3

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

Similar topics

6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
1
by: Günther Rühmann | last post by:
Hi, I´m not sure if i´m right int this group... My problem: I made a vb .net application that reads from AD via System.Directoryservices.Directoryentry. The appliocation enumerates group...
5
by: david | last post by:
I have developed my web service with a domain name of my computer name and wwwroot directory. I also developed a client of windows form application. It works locally (i.e. in the same machine). ...
4
by: Rod Gill | last post by:
Hi, I have a form that when opened in the designer appears of the screen. The form selector can't be dragged (or resized) and if I scroll right and down to centralise it the form simply jumps...
2
by: Budhi Saputra Prasetya | last post by:
Hi, I managed to create a Windows Form Control and put it on my ASP .NET page. I have done the suggestion that is provided by modifying the security settings. From the stack trace, I would...
0
by: Budhi Saputra Prasetya | last post by:
Hi, I still have the same problem with embedding Windows Control. I'll just requote what I posted last time: I managed to create a Windows Form Control and put it on my ASP .NET page. I...
21
by: Dan Tallent | last post by:
In my application I have a form (Customer) that I want to be able to open multiple copies at once. Within this form I have other forms that can be opened. Example: ZipCode. When the user enters...
3
by: shobhitguptait | last post by:
How to Run C#.NET Windows App on N/W with centralized DB using SQL SERVER 2000 Hello All...i m really grate full to c such a website where developers try to help people like us who face problems...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
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,...
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...
0
tracyyun
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...

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.