Group controls and move them together

Post Reply
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Group controls and move them together

Post by concentra »

Hi.

I it possible to group a set of controls and move them together on a dialog ?
Like defining a group of ( say + button + get ) and move them together on the dialog in only one command ?

Regards.

Maurício Faria
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Group controls and move them together

Post by nageswaragunupudi »

Yes. You need to create the Group control and other controls in the ON INIT clause.

Sample:

Code: Select all

#include "fivewin.ch"

function Main()

   local oDlg, oGroup

   DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL
   ACTIVATE DIALOG oDlg CENTERED ON INIT DlgControls( oDlg )

return nil

function dlgcontrols( oDlg )

   local oGroup

   @ 20,20 SAY "First" SIZE 100,20 PIXEL OF oDlg

   @ 50,20 GROUP oGroup TO 150,170 PIXEL OF oDlg

   @ 10,10 BUTTON "OK" SIZE 60,20 PIXEL OF oGroup ;
      ACTION oGroup:Move( oGroup:nTop, oGroup:nLeft + 30, , , .t. )

   @ 40,10 SAY "Inside" SIZE 100,20 PIXEL OF oGroup

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
concentra
Posts: 107
Joined: Mon Nov 14, 2005 10:15 am
Location: Brazil

Re: Group controls and move them together

Post by concentra »

Thanks.
Post Reply