to nages

to nages

Postby Silvio.Falconi » Sun Jan 29, 2017 4:07 pm

Dear Mr Rao ,
I wish insert a name of field into a dialog :
I made this

Code: Select all  Expand view
Function Insert_Fields(oDlg)
   Local oStru
   Local oDlgFields
   local lOk:=.f.

   USE CUSTOMER NEW ALIAS CUST SHARED VIA "DBFCDX"

   DEFINE DIALOG oDlgFields TITLE "Insert Fields" SIZE 500, 300


    @ 0,0 XBROWSE oStru SIZE -10,-10 PIXEL OF oDlgFields ;
      DATASOURCE CUST->( DbStruct() ) ;
      COLUMNS 1,2,3,4 ;
      HEADERS "FldName","Typ","Len","Dec" ;
      AUTOCOLS CELL LINES NOBORDER FASTEDIT


   WITH OBJECT oStru
      :bClrSel          := { || { CLR_BLACK, CLR_HGRAY }}
      :nStretchCol      := 4
      :bLDClickData  := {|| ( lOk := .t., CreateSay( oStru:ColPos(oStru:oCol( oStru:nArrayAt )) , oDlg ) )   }
      :CreateFromCode()
   END


   ACTIVATE DIALOG oDlgFields CENTERED

    if lOK
          CreateSay( oStru:nArrayAt[nat] , oDlg )
      Endif

   return nil


function CreateSay(ctext, oDlg )

   local oSay

   @ 1, 2 SAY oSay PROMPT "<"+alltrim(ctext)+">" OF oDlg SIZE 70, 20 DESIGN

   oSay:bGet = nil
   oSay:lWantClick = .T.
   BringWindowToTop( oSay:hWnd )
   oSay:SetFocus()

   
return nil


 



But not run ok
How I can to have the name of field?...thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Re: to nages

Postby Silvio.Falconi » Sun Jan 29, 2017 4:29 pm

Itried with


:bLDClickData := {|| ( lOk := .t., CreateSay(oStru:aRow[ oStru:NAT()] , oDlg ) ) }

it return the field of the stru but the n I have many say into dialog I not Know why
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Re: to nages

Postby nageswaragunupudi » Mon Jan 30, 2017 1:58 am

:bLDClickDatas := { || lOk := .t., CreateSay( oStru:aRow[ 1 ], oDlg ) }
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10471
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 44 guests