Error on RibbonBar

User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Error on RibbonBar

Post 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 ?
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: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post by Silvio.Falconi »

please someone can try this sample test ?

Code: Select all | Expand

#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
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
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: Error on RibbonBar

Post by Enrico Maria Giordano »

I tried your sample. The text is white so it is barely can see over the background.

EMG
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post 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 ????
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: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post 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
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
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Error on RibbonBar

Post 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.
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post 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
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
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Error on RibbonBar

Post 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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Error on RibbonBar

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post by Silvio.Falconi »

I'am using FWH March 2016

But I used it before with no problem
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
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Error on RibbonBar

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post 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
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
cnavarro
Posts: 6557
Joined: Wed Feb 15, 2012 8:25 pm
Location: España
Been thanked: 3 times

Re: Error on RibbonBar

Post by cnavarro »

James, class TRibbonBar not modified in last versions, Silvio is right
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
James Bott
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: Error on RibbonBar

Post 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
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: Error on RibbonBar

Post by Silvio.Falconi »

James,
how I can to change it for style 2015 ...have you a test to try ?
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
Post Reply