URGENT - RIBBONBAR ERROR - RESOLVED!!
Posted: Sun Apr 05, 2020 10:23 pm
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
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