Xbrowse: Agregar columna en tiempo de ejecucion

Xbrowse: Agregar columna en tiempo de ejecucion

Postby Compuin » Sun Jul 14, 2019 8:41 pm

Hola foro,

Como logro agregar una columna en tiempo de ejecucion a mi xbrowse y mantener esta columna en las siguientes ejecuciones?

Gracias de antemano
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Xbrowse: Agregar columna en tiempo de ejecucion

Postby nageswaragunupudi » Sun Jul 14, 2019 11:27 pm

Command
Code: Select all  Expand view

ADD oCol TO oBrw DATA FIELD->FIRST TITLE "FirstName"
 

Please see \fwh\include\xbrowse.ch for full syntax.

OR
Code: Select all  Expand view

oCol := oBrw:AddCol()
oCol:bEditValue := { |x| If( x == nil, FIELD->FIRST, FIELD->FIRST := x ) }
oCol:cHeader := "FirstName"
 
Regards

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

Re: Xbrowse: Agregar columna en tiempo de ejecucion

Postby Compuin » Mon Jul 15, 2019 12:47 am

nageswaragunupudi wrote:Command
Code: Select all  Expand view

ADD oCol TO oBrw DATA FIELD->FIRST TITLE "FirstName"
 

Please see \fwh\include\xbrowse.ch for full syntax.

OR
Code: Select all  Expand view

oCol := oBrw:AddCol()
oCol:bEditValue := { |x| If( x == nil, FIELD->FIRST, FIELD->FIRST := x ) }
oCol:cHeader := "FirstName"
 


I'm sorry Mr Rao, tahnk you for yor help

I meant execution time, not design time
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Xbrowse: Agregar columna en tiempo de ejecucion

Postby nageswaragunupudi » Mon Jul 15, 2019 2:03 am

This is at execution time also.

Code: Select all  Expand view
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oBrw, oBtn

   USE CUSTOMER NEW SHARED VIA "DBFCDX"

   DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL
   @ 50,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST", "LAST" ;
      CELL LINES NOBORDER

   oBrw:CreateFromCode()

   @ 10,20 BUTTON oBtn PROMPT "AddCol" SIZE 80,30 PIXEL OF oDlg
   oBtn:bAction := <||
      ADD TO oBrw DATA CUSTOMER->CITY TITLE "CITY"
      oBrw:Refresh()
      return nil
      >

   ACTIVATE DIALOG oDlg CENTERED

return nil
 


Image
Regards

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

Re: Xbrowse: Agregar columna en tiempo de ejecucion

Postby Compuin » Mon Jul 15, 2019 2:05 am

nageswaragunupudi wrote:This is at execution time also.



Great

But how can I save the new column in a .txt file ?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1214
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Xbrowse: Agregar columna en tiempo de ejecucion

Postby nageswaragunupudi » Mon Jul 15, 2019 2:34 am

But how can I save the new column in a .txt file ?

What do you mean by saving a "column" in text file?
Regards

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


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 52 guests