Subject |
Re: Help with dbase 11 menus |
From |
Andy Taylor <andy.taylor@which.net> |
Date |
Wed, 06 Jun 2018 08:57:20 -0400 |
Newsgroups |
dbase.getting-started |
Attachment(s) |
MdiMenuTest.wfm |
Yiannis,
If you add a menu to the attached mdi form you will see it working as expected.
The key elements of the work-around to this bug are:
form.onLeftMouseDown = {;form.checkMenu()}
form.onMouseOver = {;form.onMenu=false}
function onOpen
store false to form.menuFlag, form.onMenu
form.root.onInitMenu = {;store true to form.menuFlag, form.onMenu}
return
function checkMenu
if form.menuFlag and not form.onMenu
keyboard("{Esc}"); form.menuFlag = false
endif
return
Any non menu objects that get actioned while the drop-down menu is active also need to use checkMenu()
on this form that is PUSHBUTTON1 which has:
onClick = {;form.checkMenu();this.text="Clicked"}
I hope it helps....
Andy
> Hi Andy,
>
> Thanks for your response.
> Close button does not respond as a result of the problem that a drop-down menu does not close.
> At this moment I am with a pC that does not have dbase 11 installed but if I am not mistaken the popup closes if I click on the top of the form.
>
> If you can a workaround that would be great.
> I would appreciate it if you can see my other post in the Programming section regarding icon formats with dbase 11.
>
> regards
>
> Yiannis
>
> Andy Taylor Wrote:
>
> > Yiannis,
> >
> > I assume you mean that you cannot close "a drop-down" menu rather than "a popup" as you appear to be using normal menus in the video.
> >
> > I see this behaviour in dBASE 11.3 only when form.mdi is set to false. I suggest you report it as a bug, at the moment without a workaround
> > as I can't see an easy way to get it working properly... I may find time to look at this later... perhaps using onInitMenu to set custom "active" flags.
> > The menus do get closed properly if the user clicks again on the relevant menu header.
> >
> > As for the close button I have no idea why yours is not working... it works on my forms irrespective of the mdi setting. Is there specific code attached
> > to your onClose or canClose methods which is stopping the code?
> >
> > Andy
> >
> > > Hi all,
> > >
> > > I am attching 2 videos.
> > > Video dbase262 shows the main menu of my application with dbase plus 2.62
> > > Video dbase11 shows the same main menu (nothing changed in code) with dbase 11.
> > >
> > > Except of the distorted icons I noticed that with dbase11 I can not close a popoup by clicking somewhere on the form (as in 2.62) and also I clicking on the close button is not working.
> > >
> > > I would appreciate some help on the above issues.
> > >
> > > Regards
> > >
> > > Yiannis
|
|