FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Valid with Ribbon-Button
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Valid with Ribbon-Button
Posted: Sun Jun 24, 2012 01:56 PM
Hi all,

I´m trying to implement a mdi management in my app. I have a ribbon group with buttons to cascade, etc the opened mdi windows.

The buttons are coded like this
Code (fw): Select all Collapse
@ 15, 3 ADD BUTTON  oBtn1_3_1 PROMPT "Kaskadieren" ;
            BITMAP "WinCascade" ;
            GROUP oGr3_1 ;
            WHEN Len( oAppWnd:oWndClient:aWnd ) > 1 ;
            ACTION oAppWnd:Cascade() SIZE 105, 21 MOSTLEFT


The button should be activated when more than one mdi window is open. But if I open a second mdi window, the button stays inactive and is not automatically activated.

In a normal menu it is working fine.

Any solution ?
kind regards

Stefan
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Valid with Ribbon-Button
Posted: Mon Jun 25, 2012 01:29 PM

Stefan,

You may need to issue a call to Method AEvalWhen() of the buttons container, each time you open or close an MDI window.

I have implemented it in a similar way in samples\FiveDBU.prg

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Valid with Ribbon-Button
Posted: Tue Jun 26, 2012 07:19 AM

Antonio,

that´s it :D Thanks

One more question, can I access the group from the windows containerobject ? (something like this: oWnd:oRibbon:aGroups[n] ) ?

kind regards

Stefan
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Valid with Ribbon-Button
Posted: Tue Jun 26, 2012 07:51 AM

Stefan,

This way you access the groups of the tab page of the ribbon:

oWnd:aControls[ 1 ]:aDialogs[ 1 ]:aControls

aControls[ 1 ] is the Ribbon

aDialogs[ 1 ] is the first tab page

aControls[ n ] is a group

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 824
Joined: Thu Oct 13, 2005 07:39 AM
Re: Valid with Ribbon-Button
Posted: Wed Jun 27, 2012 07:21 AM

Ok, thanks :D

kind regards

Stefan

Continue the discussion