FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Group controls and move them together
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Group controls and move them together
Posted: Thu May 17, 2018 04:55 PM

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

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Group controls and move them together
Posted: Fri May 18, 2018 10:06 PM
Yes. You need to create the Group control and other controls in the ON INIT clause.

Sample:
Code (fw): Select all Collapse
#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
Posts: 124
Joined: Mon Nov 14, 2005 10:15 AM
Re: Group controls and move them together
Posted: Thu May 24, 2018 10:23 AM

Thanks.

Continue the discussion