FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Trbutton action menu
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Trbutton action menu
Posted: Tue Jul 13, 2010 06:49 AM
Hi to all.
I found a little problem in the trbutton action with a popup menu. When you click the first time
the button the popup menu is shown. But for closing it you must click outside of the menu.
Is possible to change this way of acting clicking again on the button and closing it ?
This is the code that make this. Is there a way of knowing if the popup menu is open
and then making the close of the object instead of activating the menu ?
Thanks a lot.
Massimo.

case ::nTypeButton == TYPE_SPLITPOPUP
if nRow >= ::nPopupMargin .or. !lAction
oWnd := ::oWnd
oWnd:NcMouseMove() // close the tooltip
if ! ::Active()
oWnd:oPopup = ::oPopup
::Activate( ::nTop + ::nHeight(), ::nLeft, oWnd, .f. )
oWnd:oPopup = nil
else
::End()
endif

::Refresh()
else
::click()
endif
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Trbutton action menu
Posted: Tue Jul 13, 2010 01:02 PM
Massimo,

But for closing it you must click outside of the menu.


I believe that is standard Windows behavior, but I am not familiar with TRButton. Is that part of the ribbonbar?

If changes are to be made, they should be optional and it should default to standard Windows behavior.

I recommend using standard Windows behavior whenever possible.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Trbutton action menu
Posted: Tue Jul 13, 2010 01:23 PM

Hi James.
Yes, it is part of the Ribbonbar. I was looking inside the classes to see if there is a possibility to
change this behavior.
I'm starting to convert a program that is using the Canalfive menu. With this class if you click one
time on the button the popup menu appears, and when you click it again the menu is closing.
I don't use the new Windows, and I don't know if the Office programs, that use the new interface
have this behavior.
Also on the Imac, the first click on a menu section open the popup menu, and the second click close it.
Thanks a lot.
Massimo.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Trbutton action menu
Posted: Tue Jul 13, 2010 02:00 PM

Massimo,

Hopefully, someone with the new MS Office can tell us what the standard behavior is.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Trbutton action menu
Posted: Thu Jul 15, 2010 07:23 AM

Hi James. I made the test on Office 2010 and the behavior is the same of the Apple menu.
If you click on a menu button, the first time the popup menu appears, the second time the popup menu
is closed. I've noticed also that when you have the popup menu opened, if you move the cursor on the tab
or on another button, the menu is not closing. In office the menu is opened only when the cursor is over it.
If you move the cursor on another button or on another tab, the menu is closed.
Thanks.
Massimo.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Trbutton action menu
Posted: Fri Jul 16, 2010 12:13 PM

Massimo,

Thanks for testing it.

Antonio,

Have you seen his description above about how the ribbonbar works with MS Office? It would be nice if FW's ribbonbar worked the same way.

Regards,
James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Trbutton action menu
Posted: Fri Jul 16, 2010 02:09 PM

Massimo, James,

Yes, you are right, we should change that behavior. We are trying to do it now.

We are checking with IsWindowVisible( ::oPopup:hMenu ) to see if that way we can implement it.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Trbutton action menu
Posted: Fri Jul 16, 2010 02:15 PM

Thanks Antonio.
I wait for a possible solution.
Thanks to James too for the interest in this topic.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Trbutton action menu
Posted: Fri Jul 16, 2010 11:11 PM
Massimo,

Ok, I think we already have a valid solution :-)





regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: Trbutton action menu
Posted: Sat Jul 17, 2010 06:47 AM

Hi Antonio.
Thanks so much. Now is working perfectly. :D :D :D
Have a nice weekend.
Massimo.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Trbutton action menu
Posted: Sat Jul 17, 2010 09:51 AM

good :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion