How insert a get after another?

How insert a get after another?

Postby Silvio » Wed Jul 30, 2008 7:55 am

I have this problem
I want the user insert a get after another on the dialog pressing a button on buttonbar of the main window
I made a test sample
Code: Select all  Expand view  RUN
#INCLUDE "Fivewin.ch"

Function main()
Local oWnd
  DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
      TITLE FWVERSION + " test sample " ;
      MENU BuildMenu() MDI

  DEFINE BUTTONBAR oBar SIZE 24, 27 OF oWnd 2007


    DEFINE BUTTON OF oBar  ;
      TOOLTIP "New" NOBORDER RESOURCE "New"
      //action nuovoget(oDlg)



activate Window oWnd on INIT StartTest()
return nil


function StartTest()

   local oDlg
   local nPos  := 1
   local cName := Space( 30 )

   DEFINE DIALOG oDlg TITLE "A DialogBox" FROM 10, 10 TO 23, 70

   @ 1,2  get cname size 40,20  // first get

   ACTIVATE DIALOG oDlg NOWAIT


   return nil


   function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&File"

   ENDMENU

return oMenu




I want Konw how insert a get after the first get and then another , and then another

Have you an Idea ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: How insert a get after another?

Postby Enrico Maria Giordano » Wed Jul 30, 2008 8:43 am

Just a starting point:

Code: Select all  Expand view  RUN
#INCLUDE "Fivewin.ch"

Function main()
Local oWnd, oBar, oDlg
  DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 ;
      TITLE FWVERSION + " test sample " ;
      MENU BuildMenu() MDI

  DEFINE BUTTONBAR oBar SIZE 24, 27 OF oWnd 2007


    DEFINE BUTTON OF oBar  ;
      TOOLTIP "New" NOBORDER RESOURCE "New";
      action nuovoget(oDlg)



activate Window oWnd on INIT StartTest( @oDlg )
return nil


function StartTest( oDlg )

   local nPos  := 1
   local cName := Space( 30 )

   DEFINE DIALOG oDlg TITLE "A DialogBox" FROM 10, 10 TO 23, 70

   @ 1,2  get cname size 40,20

   ACTIVATE DIALOG oDlg NOWAIT


   return nil


   function BuildMenu()

   local oMenu

   MENU oMenu
      MENUITEM "&File"

   ENDMENU

return oMenu


STATIC FUNCTION NUOVOGET( oDlg )

    LOCAL cVal := SPACE( 30 )

    STATIC nPos := 6

    @ nPos, 2 GET cVal OF oDlg SIZE 40, 20

    nPos += 3

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Wed Jul 30, 2008 11:05 am

THANKS I TRY to INSERT it ON My CODe
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Silvio » Wed Jul 30, 2008 11:08 am

ok. run ok
but if the user want del a control get or insert one betwen two gets How I can make it ?
HAve you an idea ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Enrico Maria Giordano » Wed Jul 30, 2008 11:48 am

oGet:End() to delete a GET. To insert a GET you have to play with the coordinates.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8716
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Silvio » Wed Jul 30, 2008 6:40 pm

I allready thinked it
but all I must translate all in a class and it is very difficult...
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Carlos Mora » Wed Jul 30, 2008 7:38 pm

Hi Silvio,

the order in wich the controls are read is known as zorder, and it's a property of controls in general. It can be changed using the SetWindowPos() function, the parameters are explained in:

http://msdn.microsoft.com/en-us/library/ms633545(VS.85).aspx

I'm sure this makes what you want.

Best regards,

Carlos.
Carlos Mora
 
Posts: 989
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Postby Silvio » Wed Jul 30, 2008 7:49 pm

Carlos,
Can I explain you pls it is easy
I made a class init from old tab class
I paint an header at init we call it AA
then I paint a white rectangule ( where I insert many fields), we call it BB
Now the user want insert a new item
the item is another white rectangule ( with many fields) down the rectangule BB, we call this item with CC
and then another down the rectangule CC

Then the user want del a rectangule or insert another between BB and CC
I hope you understand me
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 115 guests