Bug in RibbonBar?

Post Reply
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Bug in RibbonBar?

Post by IBTC »

Hi!

If I press on the first button:

Image

I get this:

Image

Only the text oft the buttons of the same group get gray, not the others:

Image

I tried already a lot with different refresh etc., but nothing worked. How can this problem solved?

The code:

Code: Select all

#include "ribbon.ch"

FUNCTION MAIN()

   LOCAL oWnd

   LOCAL oRibbon, oGr[3], oBtn[3]
   LOCAL lValid := .T.

   DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
      TITLE "Test Ribbon"

   oRibbon := TRibbonBar():New(oWnd, { "Item 1","Item 2" }, ,, oWnd:nWidth, 132, 26 )

   ADD GROUP oGr[1] RIBBON oRibbon TO OPTION 1 PROMPT "" WIDTH 173

       @ 5,5   ADD BUTTON oBtn[1] PROMPT "Press to Change" BITMAP "" CENTER GROUP oGr[1] ROUND SIZE 83,75;
               ACTION lValid := !lValid

       @ 5,88  ADD BUTTON oBtn[2] PROMPT "Button 1" BITMAP "" CENTER GROUP oGr[1] ROUND SIZE 83,75;
               WHEN lValid ACTION MsgInfo("Button 1")

   ADD GROUP oGr[2] RIBBON oRibbon TO OPTION 1 PROMPT "" WIDTH 90

       @ 5,5   ADD BUTTON oBtn[3] PROMPT "Button 2" BITMAP "" CENTER GROUP oGr[2] ROUND SIZE 83,75;
               WHEN lValid ACTION MsgInfo("Button 2")

   ADD GROUP oGr[3] RIBBON oRibbon TO OPTION 2 PROMPT "" WIDTH 90

       @ 5,5   ADD BUTTON oBtn[3] PROMPT "Button 3" BITMAP "" CENTER GROUP oGr[3] ROUND SIZE 83,75;
               WHEN lValid ACTION MsgInfo("Button 3")

   ACTIVATE WINDOW oWnd

return(0)
 
Thanks for help.
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Bug in RibbonBar?

Post by IBTC »

This problem still exists in FWH 11.01. :(
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Bug in RibbonBar?

Post by Silvio »

sorry but I not understand the problem
if you press a button on a group this button became gray no the others ...
or I not understood your problem
ribbon run ok here
Best Regards, Saludos

Falconi Silvio
User avatar
IBTC
Posts: 103
Joined: Sat Oct 18, 2008 8:13 pm
Location: Stuttgart, Germany
Contact:

Re: Bug in RibbonBar?

Post by IBTC »

Hi Silvio,
Silvio wrote:if you press a button on a group this button became gray no the others ...
or I not understood your problem
ribbon run ok here
Please have a closer look to the source code. All buttons except the first one have this:

Code: Select all

 WHEN lValid
If you press the first button, lValid changed and all other buttons are invalid. That means when you click on all other buttons (except the first one) nothing happens. But only the buttons in the first group (except the first) get gray. Why not "Button 2" and "Button 3"?

I advice to compile the sample code and make your own test:

- First click on "Button 1", "Button 2", "Button 3".
- Than click on "Press to change". Now you see "Button 1" get gray.
- Now press on "Button 1", "Button 2", "Button 3" and you will (hopefully) see what I mean, what is the bug...
Best Regards,
Ruediger Alich

---
HMG 3.1.3 | FTDN/FWH 13.12 | Harbour 3.2 | BCC/MinGW | Windows XP/Vista/7/8/10 (32/64-Bit), Wine (Linux/Mac) - started 1999 with FW, 1989 with Clipper
User avatar
ukservice
Posts: 417
Joined: Tue Feb 23, 2010 3:09 pm
Location: John

Re: Bug in RibbonBar?

Post by ukservice »

Also, when you click several times on the buttons, somethimes the bitmaps just disappear!!!.
FWH 11.11, Harbour 3.1 and Borland C++ 5.82
Post Reply