FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Bug in RibbonBar?
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Bug in RibbonBar?
Posted: Fri Feb 04, 2011 02:53 PM
Hi!

If I press on the first button:



I get this:



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



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

The code:

Code (fw): Select all Collapse
#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
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Bug in RibbonBar?
Posted: Tue Feb 15, 2011 03:19 PM

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
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
Re: Bug in RibbonBar?
Posted: Tue Feb 15, 2011 09:45 PM

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
Posts: 103
Joined: Sat Oct 18, 2008 08:13 PM
Re: Bug in RibbonBar?
Posted: Tue Feb 15, 2011 10:15 PM
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 (fw): Select all Collapse
 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
Posts: 417
Joined: Tue Feb 23, 2010 03:09 PM
Re: Bug in RibbonBar?
Posted: Wed Feb 16, 2011 09:41 AM

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

Continue the discussion