RibbonBar

Re: RibbonBar

Postby Enrico Maria Giordano » Wed Jun 05, 2013 5: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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: RibbonBar

Postby Enrico Maria Giordano » Wed Jun 05, 2013 6: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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: RibbonBar

Postby Silvio.Falconi » 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 November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: RibbonBar

Postby Enrico Maria Giordano » Wed Jul 03, 2013 6: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: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: RibbonBar

Postby Antonio Linares » Wed Jul 03, 2013 7:50 pm

Enrico,

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

Code: Select all  Expand view
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
User avatar
Antonio Linares
Site Admin
 
Posts: 42098
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: RibbonBar

Postby Enrico Maria Giordano » Wed Jul 03, 2013 9: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
User avatar
Enrico Maria Giordano
 
Posts: 8715
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests