Valid with Ribbon-Button

Valid with Ribbon-Button

Postby StefanHaupt » Sun Jun 24, 2012 1: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: Select all  Expand view
@ 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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Valid with Ribbon-Button

Postby Antonio Linares » Mon Jun 25, 2012 1: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Valid with Ribbon-Button

Postby StefanHaupt » Tue Jun 26, 2012 7: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
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Valid with Ribbon-Button

Postby Antonio Linares » Tue Jun 26, 2012 7: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Valid with Ribbon-Button

Postby StefanHaupt » Wed Jun 27, 2012 7:21 am

Ok, thanks :D
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests