Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Luis
  Where is Luis?
 To: Boudewijn Lutgerink
  Where is Boudewijn Lutgerink?
 Hoonaardstraat, Driel
 Boudewijn Lutgerink
Subject: RE: Menu inside toolbar
Thread ID: 50947 Message ID: 51014 # Views: 2 # Ratings: 0
Version: Visual FoxPro 8 Category: Menus
Date: Wednesday, September 08, 2004 12:52:15 AM         

One problem you will have is that a toolbar never gets focus. I try once to do a menu with buttons, but what if the user wan'ts to use the keyboard shortcuts?
Well you can Define a Menu, do not activate the menu, just define the menu and call the click event on the button for a selecction bar.
I don't have my code here, I will search for it at home and try to put it here.
> > Hi all !
> >
> > It possible to put menu inside of toolbar class ? I saw in other applications, menu inside toolbar; this toolbar can be docked.
> >
> > Thank's.
> it is possible... Kind of that is.
> First of all create a toolbar with a button on it.
> In the click event of the button comes the code
 do MyPopupmenu.mpr

> Next step is to generate a popupmenu
> The generated code might look a bit like this:
> DEFINE BAR 1 OF shortcut PROMPT "\<Pop"
> DEFINE BAR 2 OF shortcut PROMPT "P\<opper"

> The modification I made is on the first line of code.
> I added a small counter to the mrow() and mcol() just to position the popupmenu a bit better.
> This is only very basic code that can be improved in many ways.
> Eg, one could use mousemove event of the button to calculate the exact position of the menu.
> Be aware that the _screen.scalemode is in pixels and mcol(),mrow() are in foxels.
> 1 foxel = 8 pixels.
> The buttons in the toolbar can have captions as you are used to have.
> One question remains though. About the User Interface.
> How often did you see a user place the menu, let's say, at the bottom of the screen, or at one of the sides...
> With that in mind consider how much it would be worth to make a point of that.
> The basic menu, with the only add-in of genmenuX possibilities is good enough for me.
> Boudewijn LutgeĀ®ink
> There are 10 types of people: Those that do understand binary calculations and those that do not.

For long you live and high you fly


Menu inside toolbar Posted by Apple Draniel @ 9/7/2004 11:06:06 AM
RE: Menu inside toolbar Posted by Boudewijn Lutgerink @ 9/7/2004 1:31:16 PM
RE: Menu inside toolbar Posted by Luis Navas @ 9/8/2004 12:52:15 AM
RE: Menu inside toolbar Posted by Apple Draniel @ 9/13/2004 7:38:23 AM
RE: Menu inside toolbar Posted by Boudewijn Lutgerink @ 9/13/2004 7:50:53 AM
RE: Menu inside toolbar Posted by Apple Draniel @ 9/13/2004 10:15:29 AM
RE: Menu inside toolbar Posted by Boudewijn Lutgerink @ 9/14/2004 11:28:14 AM