FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour C贸mo poner un combobox en TSbrowse ?
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
C贸mo poner un combobox en TSbrowse ?
Posted: Wed Mar 18, 2009 07:26 PM

Amigos:

Alguien que tenga un peque帽o ejemplo para poner un combobox sobre TSBrowse ?

Saludos y gracias

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: C贸mo poner un combobox en TSbrowse ?
Posted: Wed Mar 18, 2009 07:43 PM
hola

Code (fw): Select all Collapse
聽 聽 ADD COLUMN TO BROWSE oIng:oLbx[_ACCESORIO2] DATA ARRAY ELEMENT 1 ;
聽 聽 聽 聽 聽 TITLE "Quien"+CRLF+"Paga" 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 SIZE 93 PIXELS 聽 聽聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 3DLOOK TRUE,TRUE,FALSE 聽 聽聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 ALIGN DT_LEFT,DT_CENTER,DT_CENTER聽聽 聽 聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 聽 COLORS CLR_HMAGENTA, RGB( 255, 255, 235)聽 聽 聽 聽 ;
聽 聽 聽 聽 聽 聽 EDITABLE

聽 聽 聽 聽 oIng:oLbx[_ACCESORIO2]:aColumns[1]:lComboBox := .t.
聽 聽 聽 聽 oIng:oLbx[_ACCESORIO2]:aColumns[1]:aItems := { "Cliente 聽 ","Automotora"}

聽 聽 聽 聽 oIng:oLbx[_ACCESORIO2]:aColumns[1]:bPostEdit := { || oIng:oLbx[_ACCESORIO2]:DrawFooters() }
Saludos
Patricio

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: C贸mo poner un combobox en TSbrowse ?
Posted: Thu Mar 19, 2009 12:39 AM

Patricio:

Muchas gracias por el ejemplo, tratar茅 de adaptarlo a mis necesidades.

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 782
Joined: Wed Dec 19, 2007 07:50 AM
Re: C贸mo poner un combobox en TSbrowse ?
Posted: Thu Mar 19, 2009 07:39 AM
Armando wrote:Alguien que tenga un peque帽o ejemplo para poner un combobox sobre TSBrowse ?

Hola Armando:

Te reproduzco una parte del texto WhatsNew.V70 que es parte de la documentaci贸n de TSBrowse

25.- New Function "ComboWBlock". Creates a View/Edit code block to edit a
cell via a ComboBox control.

Syntax:

ComboWBlock( <oBrw>, <uField>, <nCol>, <aItems> )

Parameters (all required):

<oBrw> = The TSBrowse object
<uField> = Field Pos or Field Name (any) when editing databases. Whith
arrays, <uField> will be the number of the array element.
<nCol> = Column number in <oBrw>
<aItems> = Array containing the items to be used by the ComboBox control

Note: <aItems> can be a single array or a double array ( {aItems,aData} ),
in this last case, TSBrowse will show "aItems" and will replace the
data with the corresponding "aData" element. Obviously, both
arrays must have the same number of elements.

Example:

aItems := { "Pieces", "Feet", "Gallons" }
aData := { "PC", "FT", "GA" }
nColum := 1
cField := "Unit"

@ 0, 0 BROWSE oBrw CELLED ALIAS "Products"....

ADD COLUMN TO oBrw Title "Units" COMBOBOX SIZE 80 PIXELS EDITABLE ;
DATA ComboWBlock( oBrw, cField, nColum, { aItems, aData } ) ;
.......

See SBTest.prg Sample 2

Un abrazo.

Manuel Mercado
manuelmercado at prodigy dot net dot mx
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: C贸mo poner un combobox en TSbrowse ?
Posted: Thu Mar 19, 2009 01:13 PM

Manuel:

Excelente, m谩s claro ni el agua.

Un abrazo

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: C贸mo poner un combobox en TSbrowse ?
Posted: Thu Mar 19, 2009 03:10 PM

Manuel:

Simplemente EXCELENTE !, como siempre.

Un abrazo

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion