URGENT - RIBBONBAR ERROR - RESOLVED!!

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

URGENT - RIBBONBAR ERROR - RESOLVED!!

Post by Silvio.Falconi »

if I make the window smaller and then reopen the ribbonbar controls disappear see the gif recordered





How is it possible ?

Ribbonbar is not reliable - how I solve?

this a test sample to recreate the problem

Code: Select all

#include "fivewin.ch"
#include "constant.ch"
#include "ribbon.ch"



function main()

   local oRebar
   local oWnd,oGrS1,oGrS2
   local oFontBigNum
   local dDataIniziale:= date()
   local dDataFinale:= date()
   local oDate1
   local oDate2
   local dBassa1
   local dBassa4
   local lShowNumeri:= .t.
   local lshowPagamenti:= .t.
   local oBtns[1]

   DEFINE FONT  oFontBigNum NAME "VERDANA" SIZE 30,-40

   DEFINE WINDOW oWnd TITLE "RibbonBar Test " + FWVERSION from 1,1 to 600,600 pixel //brush oBrush1
   
   DEFINE RIBBONBAR oRebar WINDOW oWnd PROMPT "test numbers" HEIGHT 133 TOPMARGIN 25
   

    ADD GROUP oGrS1 RIBBON oRebar TO OPTION 1  WIDTH 625 PROMPT "Periodo da visualizzare"
    ADD GROUP oGrS2 RIBBON oRebar TO OPTION 1  WIDTH 160 PROMPT "Prenotazione singola"

     
 @ 5,5 ADD BUTTON oBtns[1] prompt "Selezione"+CRLF+"Calendario" BITMAP "TOOLBAR_CALENDAR" ;
      GROUP oGrS1 SIZE 65,85 top ROUND SPLITPOPUP;
      MENU  MenuPopDate2(@dDataIniziale,@dDataFinale,@oDate1,@oDate2,dBassa1,dBassa4,lShowNumeri,lshowPagamenti) ;
      TOOLTIP "Selezione calendario e periodi "




 @ 12,110 GET oDate1 VAR dDataIniziale SIZE 200,30 PIXEL  OF  oGrS1 ;
   on change NIL 
 @ 12,335  GET oDate2 VAR dDataFinale SIZE 200,30 PIXEL  OF  oGrS1 ;
   on change NIL

   oRebar:nLeftMargin = 75
   oRebar:CalcPos()

  oWnd:Center()

  ACTIVATE WINDOW oWnd MAXIMIZED


   oRebar:End()

return nil
//--------------------------------------------------------------------------------------------------------//

static Function  MenuPopDate2(dDataIniziale,dDataFinale,oDate1,oDate2,dBassa1,dBassa4)
   Local oPopupDate


   MENU oPopupDate POPUP
     MENUITEM "Oggi"  ACTION ( dDataIniziale  :=date(),;
                               dDataFinale    :=date(),;
                               oDate1:refresh(),oDate2:refresh(),;
                               EVAL( oDate1:bchange),;
                               EVAL( oDate2:bchange))

     MENUITEM "Domani"  ACTION ( dDataIniziale  :=date()+1,;
                                 dDataFinale    :=date()+1,;
                                 oDate1:refresh(),oDate2:refresh(),;
                                 EVAL( oDate1:bchange),;
                                 EVAL( oDate2:bchange))

     MENUITEM "DopoDomani"  ACTION (dDataIniziale  :=date()+2,;
                                    dDataFinale    :=date()+2,;
                                    oDate1:refresh(),oDate2:refresh(),;
                                    EVAL( oDate1:bchange),;
                                    EVAL( oDate2:bchange))
      SEPARATOR

     MENUITEM "Mese Corrente"  ACTION (dDataIniziale:=bom(date()),;
                                        dDataFinale:= eom(date()),;
                                       oDate1:refresh(),oDate2:refresh(),;
                                       EVAL( oDate1:bchange),;
                                       EVAL( oDate2:bchange))

     MENUITEM "Mese Prossimo"  ACTION (dDataIniziale:=AddMonth(bom(date()),1),;
                                       dDataFinale:= AddMonth(eom(date()),1),;
                                       oDate1:refresh(),oDate2:refresh(),;
                                       EVAL( oDate1:bchange),;
                                       EVAL( oDate2:bchange))

     MENUITEM "Stagione"  ACTION (dDataIniziale:= (dBassa1),;
                                    dDataFinale:= ( dBassa4)  ,;
                                    oDate1:refresh(),oDate2:refresh(),;
                                    EVAL( oDate1:bchange),;
                                    EVAL( oDate2:bchange))


     SEPARATOR


     MENUITEM "Giugno"  ACTION (dDataIniziale:=AddMonth( BOY( DATE() ), 5 ),;
                                dDataFinale:=EoM(AddMonth( BOY( DATE() ), 5 )),;
                                oDate1:refresh(),oDate2:refresh(),;
                                EVAL( oDate1:bchange),;
                                EVAL( oDate2:bchange))

     MENUITEM "Luglio"  ACTION (dDataIniziale:=AddMonth( BOY( DATE() ), 6 ),;
                                dDataFinale:=EoM(AddMonth( BOY( DATE() ), 6 )),;
                                oDate1:refresh(),oDate2:refresh(),;
                                EVAL( oDate1:bchange),;
                                EVAL( oDate2:bchange))

     MENUITEM "Agosto"  ACTION (dDataIniziale:=AddMonth( BOY( DATE() ), 7 ),;
                                dDataFinale:=EoM(AddMonth( BOY( DATE() ), 7 )),;
                                oDate1:refresh(),oDate2:refresh(),;
                                EVAL( oDate1:bchange),;
                                EVAL( oDate2:bchange))


       MENUITEM "Settembre"  ACTION (dDataIniziale:=AddMonth( BOY( DATE() ), 8 ),;
                                     dDataFinale:=EoM(AddMonth( BOY( DATE() ), 8 )),;
                                     oDate1:refresh(),oDate2:refresh(),;
                                     EVAL( oDate1:bchange),;
                                     EVAL( oDate2:bchange))


 
 ENDMENU

 return oPopupDat
Last edited by Silvio.Falconi on Tue Apr 07, 2020 4:27 pm, edited 2 times in total.
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
MOISES
Posts: 824
Joined: Wed Aug 22, 2007 10:09 am

Re: URGENT - RIBBONBAR ERROR

Post by MOISES »

Saludos / Regards,

FWH 20.04, Harbour 3.2.0 dev (r1909261630) y BCC 7.40
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT - RIBBONBAR ERROR

Post by Silvio.Falconi »

MOISES wrote:Yes, already noticed in:

http://forums.fivetechsupport.com/viewt ... =6&t=38730

but it's not the same: I'm not talking to you about reducing the buttons


A lot more happens in my application

when I press the popup menu which is inside a button and reduce the window, everything in the tGroup disappears (oGrs1)

if I move the whole window appears under the tgroup (outside the program itself) and then disappears if one clicks on it with The mouse

Image

try the test I published and reduce the window, click on the first button (where you found a menupopup) then resize the window and you will find the tgroup under the main window
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT - RIBBONBAR ERROR

Post by Silvio.Falconi »

there is a error on PopupGroup() method of CLASS TRBGroup


I did a test
I remmed everything that is written in the CLASS TRBGroup PopupGroup () method.

I made the window smaller

if I click on the button the menu is not displayed

then I widened the window and everything is as before

so the error is on this method when it goes to create the popup window

for the mine application for now I resolve in this mode
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: URGENT - RIBBONBAR ERROR

Post by Antonio Linares »

Dear Silvio,

Your example is working fine here

Could you created an animated GIF to show how to reproduce the error or explain it ?

many thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT - RIBBONBAR ERROR

Post by Silvio.Falconi »

it's easy
when you have the main window shrunk, in the group of the ribbonbar show an arrow if you click on that arrow it shows you what is in the group in popup mode
leaving the popup window open and widening the window afterwards you will not see the controls in the group of the ribbonbar
if you move the whole window with the mouse you will see that the popup is below

please see this
https://we.tl/t-hXtWhZg9Yi
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: URGENT - RIBBONBAR ERROR

Post by Antonio Linares »

Fixed, many thanks

Image
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: URGENT - RIBBONBAR ERROR

Post by Silvio.Falconi »

thanks run ok
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply