PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework show a new control outside of its parent

Reply

show a new control outside of its parent

 
Thread Tools Rate Thread
Old 04-02-2004, 01:13 PM   #1
Milosz - [playseven.com]
Guest
 
Posts: n/a
Default show a new control outside of its parent


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


  Reply With Quote
Old 04-02-2004, 03:24 PM   #2
AirPete
Guest
 
Posts: n/a
Default Re: show a new control outside of its parent

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

- Pete

Milosz - [playseven.com] wrote:
> 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




  Reply With Quote
Old 05-02-2004, 08:58 AM   #3
Milosz - [playseven.com]
Guest
 
Posts: n/a
Default Re: show a new control outside of its parent

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


"AirPete" <x@x.x> schrieb im Newsbeitrag
news:Cg7Ub.11585$F23.10486@newsread2.news.pas.earthlink.net...
> Try dynamically adding the control to yourControl.Parent when you want it
> shown, and then removing it to hide.
>
> - Pete
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off