FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour xBrowse y SetOrder()
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
xBrowse y SetOrder()
Posted: Tue May 04, 2010 10:34 PM

Holas..

Como poder mostrar el Bitmap asociado en el header al iniciar el xBrowse.

Ahora se activa solo cuando presiono sobre el Header

oBrw:aCols[x]:bLClickHeader:={|| oBrw:aCols[x]:SetOrder()}

Quiero mostrarlo apenas se construya el xBrowse, no solo cuando se presiona sobre el header para activar el SORT.

Alguna idea...

Gracias

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse y SetOrder()
Posted: Wed May 05, 2010 04:02 AM
The code
Code (fw): Select all Collapse
oBrw:aCols[x]:bLClickHeader:={|| oBrw:aCols[x]:SetOrder()}

is not necessary and this is redundant. It is enough if we assign value to oCol:cSortOrder (OrderTag/Index name).
If oCol:cSortOrder is assginged a value, xBrowse automatically calls the oCol:SetOrder() method when the user clicks on header and after sorting the column, also evaluates oCol:bLClickHeader.

When XBrowse starts, if the database is already sorted, the bitmap on the header of the sorted column is automatically shown, even without clicking on the header. ( There was a bug in some earlier versions, but in all recent versions this is shown correctly)

Can you inform the FWH version you are using?
Regards



G. N. Rao.

Hyderabad, India
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: xBrowse y SetOrder()
Posted: Wed May 05, 2010 12:45 PM

Nageswaragunupudi

You are absolutely rigth... this piece of code was a "legacy" from and old program.
I took it off, assign oBrw:aCols[x]:SetOrder(xValue) and everything is working fine.

Thanks...
From Chile
Adolfo

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse y SetOrder()
Posted: Wed May 05, 2010 01:08 PM
Not correct:
Code (fw): Select all Collapse
oBrw:aCols[x]:SetOrder(xValue)


Correct:
Code (fw): Select all Collapse
oBrw:aCols[x]:cSortOrder := <OrderTagName>


Actually in the recent versions of xBrowse, we need not take the trouble of assigning oCol:cSortOrder := <TagName>.

If we construct XBROWSE with the command syntax with COLUMNS clause, XBrowse itself takes the trouble of scanning all index expressions and finding the appropriate Tag Name for each column.

I advise using XBrowse's advanced capabilities to our best advantage.
Regards



G. N. Rao.

Hyderabad, India
Posts: 883
Joined: Tue Oct 11, 2005 11:57 AM
Re: xBrowse y SetOrder()
Posted: Wed May 05, 2010 01:40 PM

nageswaragunupudI

I don't use the Columns Clause, since I'm using it in a generic browse controller, so, I pass parameters to it, in this case a Recordset, Columns Names, Pictures, Columns sizes etc etc
One of this parameter is the Recordset order or an Array of Orders to activate or not the posibility of using it to do softseeks, direct seeks or filters within the Browse.

Any way, I found the solution, now I have the BITMAP at the moment of building the xBrowse.

Thanks again

;-) Ji,ji,ji... buena la cosa... "all you need is code"

http://www.xdata.cl - Desarrollo Inteligente
----------
Asus TUF F15, 32GB Ram, 2 * 1 TB NVME M.2, GTX 1650
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
Re: xBrowse y SetOrder()
Posted: Thu May 06, 2010 02:36 AM

Rao:
Could you send me your email address I have a question. Send to hgoldstein@dslextreme.com.
It has to do with code you posted which seems to have disapered. Re: a dat file.

Thank you in advance.

Thank you

Harvey
Posts: 336
Joined: Wed May 16, 2007 09:40 PM
Re: xBrowse y SetOrder()
Posted: Mon Jul 12, 2010 07:07 PM

Como obtengo el valor del header

Fivewin-Xharbour 24.09, Iquique, Chile
Posts: 1074
Joined: Fri Oct 07, 2005 01:56 PM
Re: xBrowse y SetOrder()
Posted: Mon Jul 12, 2010 09:46 PM
Prueba con esto?

Code (fw): Select all Collapse
oBrw:aCols[nColumna]:cHeader
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: 336
Joined: Wed May 16, 2007 09:40 PM
Re: xBrowse y SetOrder()
Posted: Tue Jul 13, 2010 12:37 AM

No esto no soluciono mi problema, me explico mejor , quiero saber cual es la columna activa por la cual esta ordenado el xbrowse

Fivewin-Xharbour 24.09, Iquique, Chile
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse y SetOrder()
Posted: Tue Jul 13, 2010 01:11 AM
Code (fw): Select all Collapse
oBrw:SelectedCol():cHeader
Regards



G. N. Rao.

Hyderabad, India
Posts: 336
Joined: Wed May 16, 2007 09:40 PM
Re: xBrowse y SetOrder()
Posted: Tue Jul 13, 2010 02:30 PM

Gracias Nageswaragunupudi

se me resolvio mi problema

Fivewin-Xharbour 24.09, Iquique, Chile
Posts: 336
Joined: Wed May 16, 2007 09:40 PM
Re: xBrowse y SetOrder()
Posted: Mon Jul 26, 2010 12:39 AM

una pregunta como puedo bloquear el tamaño de una fila
por ejemplo las columna las bloqueos con
olbx:acols[1]:lallowsizing:=.f.

pero como lo hago con las filas

gracias

Fivewin-Xharbour 24.09, Iquique, Chile
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: xBrowse y SetOrder()
Posted: Mon Jul 26, 2010 05:04 AM

oLbx:lAllowRowSizing := .f.

Regards



G. N. Rao.

Hyderabad, India
Posts: 336
Joined: Wed May 16, 2007 09:40 PM
Re: xBrowse y SetOrder()
Posted: Mon Jul 26, 2010 02:23 PM

ok, funciono a la perfeccion, gracias

Fivewin-Xharbour 24.09, Iquique, Chile

Continue the discussion