Ulrich
Thu Sep 11 05:49:51 CDT 2003
Hey Joe,
this is a very interesting idea. I'll give that a try!
Thanks,
Ulrich
"Joe White" <ip255@hotmail.com> schrieb im Newsbeitrag news:3F600C19.7080806@hotmail.com...
> Put your listbox onto a separate Form with FormBorderStyle.None and
> TopMost=true, and position it so its top-left corner (in screen
> coordinates) is the same as the bottom-left corner of the combo box.
> That's essentially the way the standard ComboBox control works.
>
>
> Andrew Cuthbert wrote:
> > Ulrich,
> >
> > thanks for the reply. I've taken a look at your code on the site, and I
> > think you've taken a very different approach. You are inheriting from
> > Forms.ComboxBox which will handle the display of the listbox for you. What I
> > want is to draw the listbox above everything, not only in my
> > application/form but outside the form. If you put a combo box at the bottom
> > of a form and open the drop down - you will notice the list pops out over
> > the edge of the form. It is this behaviour I'm trying to reproduce but for
> > various reasons I can't inherit from combobox - not least because it'll
> > really bug me if a Microsoft .NET component can do things I can't in my
> > components!!
> >
> > Thanks for your help - any futher thoughts?
> >
> > Andrew
> >
> > "Ulrich Sprick" <nospam.ulrich.sprick@gmx.de> wrote in message
> > news:Obzb5t7dDHA.2312@TK2MSFTNGP12.phx.gbl...
> >
> >>Hi Andrew,
> >>
> >>why not make the form a bit larger at the bottom? Perhaps at runtime if
> >
> > the listbox dropps down? Or move the combobox a bit up?
> >
> >>I am writing the glue logic to make a combo from a textbox, a button and
> >
> > listbox for use in a datagrid column to avoid exactly this
> >
> >>problem. Not easy, I can say... I expect it to be done during the next
> >
> > week, you may have a look at
> >
> >>
http://www.i-syn.gmxhome.de/devcom/colstyles/intro.htm
> >>
> >>then.
> >>Ulrich
> >>
> >>
> >>"Andrew Cuthbert" <acuthbert@gcdtech.com> schrieb im Newsbeitrag
> >
> > news:5fba01c37776$91d6b700$a501280a@phx.gbl...
> >
> >>>Hi all,
> >>>
> >>>I'm struggling with something I thought would be simple. I
> >>>need to build a combo box from scratch as I need to do
> >>>more alterations than an owner draw combo box will allow.
> >>>I was always told a combo box was just a textbox and a
> >>>listbox. Well, that's fine but the listbox is bound by the
> >>>clipping region of the form. Thus if the combo is
> >>>positioned near the bottom of the form, the listbox gets
> >>>chopped off.
> >>>
> >>>I've tried creating a form for the listbox to sit on, and
> >>>then move both to the relevant location. This is still
> >>>buggy though as when you click in the listbox, the host
> >>>form loses focus - and I also suspect creating a whole
> >>>form just for this feature is not very efficient.
> >>>
> >>>There must be a way surely to do this in .NET through GDI+
> >>>or something. Essentially all I want is to fool .NET into
> >>>drawing the listbox where I specify on the screen, without
> >>>being bound by a forms drawing area.
> >>>
> >>>Any ideas?
> >>>
> >>>Thanks,
> >>>
> >>>Andrew Cuthbert
>