show a new control outside of its parent

  • Thread starter Milosz - [playseven.com]
  • Start date
M

Milosz - [playseven.com]

I am programming a control for the CF, and i need to make something like the
ComboBox enroll behavior.
If you click on it. it should enroll another item, for example a picturebox.

To enroll it down, it could be possible to define the picture box inside the
control, and on cliking the control to change its clientsize to make the
picturebox visible. But if the control shall enroll it to the top, because
its on the bottom of the form, I would have to change its location and the
size.
the original combobox shows the new item, without changing its size and
location.

So my question is how to show a new control outside of its parent ?

somebody knows help ?

THX

Milosz

www.playseven.com
 
A

AirPete

Try dynamically adding the control to yourControl.Parent when you want it
shown, and then removing it to hide.

- Pete
 
M

Milosz - [playseven.com]

Hi Pete,

i don't know how should this help ?
Where is the difference if I create the CTRL dynamically.
The problem is, if i define it and set the location of the new CTRL to -200
it will be not shown, because the parent control draws only the client area

Somebody knows how the ComboBox does it ?

THX

Milosz
www.playseven.com
 
D

David Wrighton [MS]

This sort of feature is typically done by parenting the window that
"appears" to the control's parent, or the form. The combo box actually
parents the listbox drop down to the screen(which is something that cannot
be done in a supported manner in .NETCF.

David Wrighton
..NET Compact Framework

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Milosz - [playseven.com]" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: show a new control outside of its parent
| Date: Thu, 5 Feb 2004 08:58:58 +0100
| Lines: 25
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups:
microsoft.public.dotnet.framework,microsoft.public.dotnet.framework.compactf
ramework,microsoft.public.dotnet.languages.vb,microsoft.public.in.dotnet.com
pactframework,microsoft.public.win32.programmer.wince
| NNTP-Posting-Host: abl218.neoplus.adsl.tpnet.pl 83.27.21.218
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
..phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:44933
microsoft.public.dotnet.languages.vb:179047
microsoft.public.in.dotnet.compactframework:894
microsoft.public.win32.programmer.wince:2553
microsoft.public.dotnet.framework:64459
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hi Pete,
|
| i don't know how should this help ?
| Where is the difference if I create the CTRL dynamically.
| The problem is, if i define it and set the location of the new CTRL to
-200
| it will be not shown, because the parent control draws only the client
area
| >0.
|
| Somebody knows how the ComboBox does it ?
|
| THX
|
| Milosz
| www.playseven.com
|
|
| | > Try dynamically adding the control to yourControl.Parent when you want
it
| > shown, and then removing it to hide.
| >
| > - Pete
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top