FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour to nages
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
to nages
Posted: Sun Jan 29, 2017 04:07 PM
Dear Mr Rao ,
I wish insert a name of field into a dialog :
I made this

Code (fw): Select all Collapse
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 March-April 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
Posts: 7318
Joined: Thu Oct 18, 2012 07:17 PM
Re: to nages
Posted: Sun Jan 29, 2017 04: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 March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: to nages
Posted: Mon Jan 30, 2017 01:58 AM

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

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion