Page 1 of 2

Error on RibbonBar

PostPosted: Sun Jun 12, 2016 5:21 pm
by Silvio.Falconi
I tried ribbonbar with l2013 style and Ifound an error

on tab I not see the text of the name of tab ...why ?

Image

When a 2015 style ?

Re: Error on RibbonBar

PostPosted: Mon Jun 13, 2016 3:09 pm
by Silvio.Falconi
please someone can try this sample test ?

Code: Select all  Expand view
#include "FiveWin.ch"
#include "ribbon.ch"

static oWndMain,oBar
Function test()

DEFINE WINDOW oWndMain

ribbonbar()

ACTIVATE WINDOW oWndMain
return nil

function ribbonbar()
Local aRibbonMenu:={"Contabilità","Inventario","Utilità"}
Local nHeightRib:=130
Local oGr1,oGr2,oGr3,oGr4,oGr5,oGr6,oGr7,oGr8,oGr9
Local nOption:= 1
Local nStart:= 1
Local oHand:= TCursor():New(,'HAND')

      oBar=TRibbonBar():New( oWndMain, aRibbonMenu, ,nOption ,;
               oWndMain:nWidth, nHeightRib, 26, , , ,;
               , , , , , , .T., nStart )

       oBar:l2013:= .t.

 ADD GROUP oGr1 RIBBON oBar TO OPTION 1  WIDTH 140    PROMPT "Attività esercizi conabili"
 ADD GROUP oGr5 RIBBON oBar TO OPTION 2  WIDTH 270  PROMPT "Inventario Beni"
 ADD GROUP oGr3 RIBBON oBar TO OPTION 3  WIDTH 240  PROMPT "Configurazione"

        oBar:oCursor:= oHand
        oBar:nLeftMargin = 10
        oBar:CalcPos()
        oBar:bRClicked := { || .t. }





        RETURN nil
 



it seem to run but when I click on one tab I not see the name of the tab

Re: Error on RibbonBar

PostPosted: Mon Jun 13, 2016 4:49 pm
by Enrico Maria Giordano
I tried your sample. The text is white so it is barely can see over the background.

EMG

Re: Error on RibbonBar

PostPosted: Mon Jun 13, 2016 6:38 pm
by Silvio.Falconi
It happen only with l2013.
I not understtod why and I not found a solution, I know that class but I not found where I can modify it
I think the error is from 878 to 901 lines

889 nClrTxt = CLR_WHITE ????

Re: Error on RibbonBar

PostPosted: Mon Jun 13, 2016 6:53 pm
by Silvio.Falconi
pls try
//2007
oBar=TRibbonBar():New( oWndMain, aRibbonMenu, ,nOption ,;
oWndMain:nWidth, nHeightRib, 26, , , ,;
, , , , , , .F., nStart,.f. )

or
//2013
oBar=TRibbonBar():New( oWndMain, aRibbonMenu, ,nOption ,;
oWndMain:nWidth, nHeightRib, 26, , , ,;
, , , , , , .F., nStart,.t. )
or

// 2010
oBar=TRibbonBar():New( oWndMain, aRibbonMenu, ,nOption ,;
oWndMain:nWidth, nHeightRib, 26, , , ,;
, , , , , , .t., nStart,.f. )


perhaps there are some errors

Re: Error on RibbonBar

PostPosted: Mon Jun 13, 2016 7:16 pm
by cnavarro
Silvio, at moment try this

function ribbonbar()
Local aRibbonMenu:={"Contabilità","Inventario","Utilità"}
Local nHeightRib:=130
Local oGr1,oGr2,oGr3,oGr4,oGr5,oGr6,oGr7,oGr8,oGr9
Local nOption:= 1
Local nStart:= 0
Local oHand:= TCursor():New(,'HAND')

oBar=TRibbonBar():New( oWndMain, aRibbonMenu, ,nOption ,;
oWndMain:nWidth, nHeightRib, 26, , , ,;
, , , , , , .F., nStart, .T.)

//oBar:l2013:= .t.

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 7:16 am
by Silvio.Falconi
Cris,
I insert your code
Look ... do you see the name of the first tab ?

Image

Perhaps..but I am not a bionic man

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 11:46 am
by cnavarro
Silvio.Falconi wrote:Cris,
I insert your code
Look ... do you see the name of the first tab ?

Perhaps..but I am not a bionic man


Silvio
Yes, I see name of the first tab

Image

Image

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 3:59 pm
by James Bott
Silvio,

The problem seems to be that that text is the right color (white), but the currently selected tab's background color is not changing to dark blue. This is definitely a bug.

However, I am using FWH 16.02 and Cristobal is using 16.04. What version are you using Silvio? May I suggest adding your current FWH version to your automatic signature line so you don't have to manually add it to each post.

James

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 4:21 pm
by Silvio.Falconi
I'am using FWH March 2016

But I used it before with no problem

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 4:26 pm
by James Bott
But I used it before with no problem


Then it must have been working in a version before 16.02 and then broken, then fixed in ver 16.04.

James

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 4:57 pm
by Silvio.Falconi
no fixed in 16.04 ( pls see whath new viewtopic.php?f=16&t=32427&start=0)

on October, November 2013 - Fix: Minor fix in Class TRibbon when style 2013 is use (viewtopic.php?p=153931#p153931)

I tried with :
tribbon of fwh 16.02 ---> not run
tribbon of fwh 16.01 ---> not run
tribbon of fwh 15.01 ---> not run

the bug is
Local nStart:= 1

if nStart:= 0 seem to run and each tab become as nstart

but I wish nstart = 1

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 5:14 pm
by cnavarro
James, class TRibbonBar not modified in last versions, Silvio is right

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 5:21 pm
by James Bott
Silvio,

I have no experience using ribbonbars. I thought that the dark blue color was supposed to be the currently selected tab, but after looking at Windows 10 File Explorer that does not seem to be right. The blue tab seems to be more like a menu than a ribbonbar section. So, I was wrong thinking that the other tabs were supposed to be white text with a blue background (at least on the 2015 setting).

File Explorer shows all the other tabs as black text on a gray background. But one of Cristobal's screenshots shows them white text on a blue background. Maybe that has something to do with the nStart value? What is the nStart value?

Is there documentation on the ribbonbar somewhere?

James

Re: Error on RibbonBar

PostPosted: Tue Jun 14, 2016 5:43 pm
by Silvio.Falconi
James,
how I can to change it for style 2015 ...have you a test to try ?