textbox inside a popup menu? anyone fancy their chances??


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: textbox inside a popup menu? anyone fancy their chances??

  1. #1
    Crispin Wright Guest

    textbox inside a popup menu? anyone fancy their chances??


    I'd like to put a textbox alongside a menuitem in a popup menu, i.e. the popup
    in access2k. I tried all sorts of things, like setting the parent of the
    textbox to the handle of the popupmenu (crude I know)...I tried using CreateWindow
    onto the menu (also no good). Do I have to create a menu template of my
    own, then implement owner drawn menus or something???

    Someone must find this remotely challenging? (or not <g>)

    Im about to give up and go finish my multiselect treeview - hmmmph!

    TIA

    Crispin

  2. #2
    Ron Phillips Guest

    Re: textbox inside a popup menu? anyone fancy their chances??


    I wanted the same popup and couldn't quite get it right either - so
    ended up making a custom form that looks identical to it, and raising
    an event when they click on the different things. Works like a charm,
    just not as easy as a regular popup would have been.

    Ron

    On 13 Dec 2000 03:36:31 -0800, "Crispin Wright"
    <crispin@freediver.co.uk> wrote:
    >
    >I'd like to put a textbox alongside a menuitem in a popup menu, i.e. the popup
    >in access2k. I tried all sorts of things, like setting the parent of the
    >textbox to the handle of the popupmenu (crude I know)...I tried using CreateWindow
    >onto the menu (also no good). Do I have to create a menu template of my
    >own, then implement owner drawn menus or something???
    >
    >Someone must find this remotely challenging? (or not <g>)
    >
    >Im about to give up and go finish my multiselect treeview - hmmmph!
    >
    >TIA
    >
    >Crispin



  3. #3
    Ron Phillips Guest

    Re: textbox inside a popup menu? anyone fancy their chances??


    I wanted the same popup and couldn't quite get it right either - so
    ended up making a custom form that looks identical to it, and raising
    an event when they click on the different things. Works like a charm,
    just not as easy as a regular popup would have been.

    Ron

    On 13 Dec 2000 03:36:31 -0800, "Crispin Wright"
    <crispin@freediver.co.uk> wrote:
    >
    >I'd like to put a textbox alongside a menuitem in a popup menu, i.e. the popup
    >in access2k. I tried all sorts of things, like setting the parent of the
    >textbox to the handle of the popupmenu (crude I know)...I tried using CreateWindow
    >onto the menu (also no good). Do I have to create a menu template of my
    >own, then implement owner drawn menus or something???
    >
    >Someone must find this remotely challenging? (or not <g>)
    >
    >Im about to give up and go finish my multiselect treeview - hmmmph!
    >
    >TIA
    >
    >Crispin



  4. #4
    Ben Baird \(VBThunder\) Guest

    Re: textbox inside a popup menu? anyone fancy their chances??

    Crispin,

    As you may have already suspected, Microsoft applications that utilize
    CommandBars do not use "real" menus, i.e., they are not of the windows class
    for menus that Windows provides. The equivalent solution in Visual Basic is
    to build a menu look-alike with a Form, and pop up the form in place of a
    menu. Actually attempting to put a textbox into an existing Windows-type
    menu is a losing battle - not one that you *can't* win, necessarily, but one
    that is more trouble than it's worth.

    The form-as-menu solution is not a "difficult" task per se, but it is
    relatively time-consuming. I needed this functionality for one of my apps
    and ended up implementing that solution myself. Unfortunately, as of this
    time I don't have any standalone examples. I've meant for a while now to
    rewrite a standalone version for my Web site, but other things have kept me
    occupied and I haven't updated the source code on my site in a long time :-(

    My advice to you would be to drop the idea of using the Windows-provided
    menus for this task. Your best bet is to implement a custom menu, or, in the
    interests of saving time, come up with another approach for your interface
    (a property page often works well, the drawback being that it is a full,
    separate interface).

    --
    Ben Baird
    www.vbthunder.com
    (E-mailed replies will be ignored.)

    "Crispin Wright" <crispin@freediver.co.uk> wrote in message
    news:3a375f3f$1@news.devx.com...
    >
    > I'd like to put a textbox alongside a menuitem in a popup menu, i.e. the

    popup
    > in access2k. I tried all sorts of things, like setting the parent of the
    > textbox to the handle of the popupmenu (crude I know)...I tried using

    CreateWindow
    > onto the menu (also no good). Do I have to create a menu template of my
    > own, then implement owner drawn menus or something???
    >
    > Someone must find this remotely challenging? (or not <g>)
    >
    > Im about to give up and go finish my multiselect treeview - hmmmph!
    >
    > TIA
    >
    > Crispin




  5. #5
    Ben Baird \(VBThunder\) Guest

    Re: textbox inside a popup menu? anyone fancy their chances??

    Crispin,

    As you may have already suspected, Microsoft applications that utilize
    CommandBars do not use "real" menus, i.e., they are not of the windows class
    for menus that Windows provides. The equivalent solution in Visual Basic is
    to build a menu look-alike with a Form, and pop up the form in place of a
    menu. Actually attempting to put a textbox into an existing Windows-type
    menu is a losing battle - not one that you *can't* win, necessarily, but one
    that is more trouble than it's worth.

    The form-as-menu solution is not a "difficult" task per se, but it is
    relatively time-consuming. I needed this functionality for one of my apps
    and ended up implementing that solution myself. Unfortunately, as of this
    time I don't have any standalone examples. I've meant for a while now to
    rewrite a standalone version for my Web site, but other things have kept me
    occupied and I haven't updated the source code on my site in a long time :-(

    My advice to you would be to drop the idea of using the Windows-provided
    menus for this task. Your best bet is to implement a custom menu, or, in the
    interests of saving time, come up with another approach for your interface
    (a property page often works well, the drawback being that it is a full,
    separate interface).

    --
    Ben Baird
    www.vbthunder.com
    (E-mailed replies will be ignored.)

    "Crispin Wright" <crispin@freediver.co.uk> wrote in message
    news:3a375f3f$1@news.devx.com...
    >
    > I'd like to put a textbox alongside a menuitem in a popup menu, i.e. the

    popup
    > in access2k. I tried all sorts of things, like setting the parent of the
    > textbox to the handle of the popupmenu (crude I know)...I tried using

    CreateWindow
    > onto the menu (also no good). Do I have to create a menu template of my
    > own, then implement owner drawn menus or something???
    >
    > Someone must find this remotely challenging? (or not <g>)
    >
    > Im about to give up and go finish my multiselect treeview - hmmmph!
    >
    > TIA
    >
    > Crispin




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center