FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour RibbonBar
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: RibbonBar
Posted: Wed Jun 05, 2013 05:59 PM
Massimo,

Massimo Linossi wrote:Yes Enrico, but not the last one.
When I've tested it, I saw that is not working in a perfect way.
When you click on a button that has a popup menu, you can close the menu only clicking on another button.
The correct way, as in the last versions of Office, even on a Mac, is click the button and for closing click again on it.
And the little arrow, when there is the popup menu, is not correctly visible on a Terminal Server session.
How is working now ?


I can't test it under TM session but the menu correctly close on click over the button.

EMG
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: RibbonBar
Posted: Wed Jun 05, 2013 06:01 PM
Silvio,

Silvio.Falconi wrote:Enrico,
I'm thinking and I saw the oldest releases of Daniel not supported the ribbonbar on a Dialog but only on Window.
Perhaps with Dialog there was problems, I don't Know why
Then on the last release I not founded the control command on the new method of ribbonbar
where blocked it the oWnd:Iskindof was a Dialog but I am sure there was .


The current version of ribbonbar works fine on a dialog.

EMG
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: RibbonBar
Posted: Thu Jun 06, 2013 10:30 AM

Enrico then there is an error when you use ribbonbar in a window and a Vistamenu on his oClient, with a texplorerbar at left
If I use toolbar or buttonbar instead of riobbonbar I not have any errors

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: RibbonBar
Posted: Wed Jul 03, 2013 06:27 PM
One more problem. In the sample below, if you click on the little arrow (of Test 2) the menu is in the correct position. But if you click on the icon (using ::ShowPopup()), the menu is at column zero.

Code (fw): Select all Collapse
#include "Fivewin.ch"
#include "Ribbon.ch"


FUNCTION MAIN()

    LOCAL oDlg

    USE CUSTOMER

    DEFINE DIALOG oDlg;
           SIZE 800, 600

    @ 4, 1 LISTBOX FIELDS SIZE 200, 200

    ACTIVATE DIALOG oDlg;
             ON INIT MAKERIBBON( oDlg );
             CENTER

    RETURN NIL


STATIC FUNCTION MAKERIBBON( oDlg )

    LOCAL oRib

    LOCAL oGr1, oGr2, oGr3, oGr4

    LOCAL oMn1

    MENU oMn1 POPUP
        MENUITEM "Test 1" ACTION MSGINFO( "Test 1" )
        MENUITEM "Test 2" ACTION MSGINFO( "Test 2" )
        MENUITEM "Test 3" ACTION MSGINFO( "Test 3" )
        MENUITEM "Test 4"
    ENDMENU

    DEFINE RIBBONBAR oRib OF oDlg;
           HEIGHT 100;
           PROMPT "Test 1", "Test 2", "Test 3"

    oRib:SetSize( oDlg:nWidth, 100 )

    ADD GROUP oGr1 RIBBONBAR oRib;
              WIDTH 80;
              TO OPTION 1;

    @ 4, 4 ADD BUTTON GROUP oGr1;
           SIZE oGr1:nWidth - 9, oGr1:nHeight - 7;
           PROMPT "Test 1";
           BITMAP "OPEN.BMP";
           ACTION MSGINFO( "Test 1" )

    ADD GROUP oGr2 RIBBONBAR oRib;
              WIDTH 80;
              TO OPTION 1;

    @ 4, 4 ADD BUTTON GROUP oGr2;
           SIZE oGr2:nWidth - 9, oGr2:nHeight - 7;
           PROMPT "Test 2";
           BITMAP "OPEN.BMP";
           ACTION ::ShowPopup();
           POPUP MENU oMn1

    ADD GROUP oGr3 RIBBONBAR oRib;
              WIDTH 80;
              TO OPTION 2;

    @ 4, 4 ADD BUTTON GROUP oGr3;
           SIZE oGr3:nWidth - 9, oGr3:nHeight - 7;
           PROMPT "Test 3";
           BITMAP "OPEN.BMP";
           ACTION MSGINFO( "Test 3" )

    ADD GROUP oGr4 RIBBONBAR oRib;
              WIDTH 80;
              TO OPTION 2;

    @ 4, 4 ADD BUTTON GROUP oGr4;
           SIZE oGr4:nWidth - 9, oGr4:nHeight - 7;
           PROMPT "Test 4";
           BITMAP "OPEN.BMP";
           ACTION MSGINFO( "Test 4" );
           POPUP MENU oMn1

    RETURN NIL


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RibbonBar
Posted: Wed Jul 03, 2013 07:50 PM
Enrico,

There is a bug in Class TRBtn Method ShowPopup(). This seems to be the right fix:

Code (fw): Select all Collapse
METHOD ShowPopup() CLASS TRBtn

   local oWnd

   if ::oPopup != nil
      if GetClassName( GetParent( Self:hWnd ) ) != "TBAR"
         oWnd = oWndFromhWnd( GetParent( Self:hWnd ) )
      endif
      oWnd:NcMouseMove() // close the tooltip
      if oWnd:oPopup == nil
         oWnd:oPopup = ::oPopup
         ::oPopup:Activate( ::nHeight() + 3, 3, oWnd, .F. )
         oWnd:oPopup = nil
      else
         oWnd:oPopup = nil
      endif
      ::Refresh()
   endif

return nil
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: RibbonBar
Posted: Wed Jul 03, 2013 09:17 PM
Antonio,

Antonio Linares wrote:Enrico,

There is a bug in Class TRBtn Method ShowPopup(). This seems to be the right fix:


Thank you, Master! :-)

EMG

Continue the discussion