ajustar columna XBrowse(SOLUCIONADO)

Post Reply
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

ajustar columna XBrowse(SOLUCIONADO)

Post by jvtecheto »

Hola amigos:

Estoy intentando pasar los Browses a Xbrowses , en algunas columnas observo que no se ajustan como antes.

mirad esta en el campo codigo.

Image

Como puedo hacer que se ajuste al ancho de la columna de texto, en este caso para que se vea bien toda la cabecera.

Gracias por vuestra inestimeble ayuda.

Jose.
Last edited by jvtecheto on Sun Oct 27, 2019 6:50 pm, edited 1 time in total.
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
User avatar
Bayron
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: ajustar columna XBrowse

Post by Bayron »

Esto puede darte una idea

Code: Select all

ListVentWidth :=  oDialog:nWidth;

xBrowse oBrw OF oDialog ;
FIELDSIZES ( ListVentWidth * .10 ) , ( ListVentWidth * .50 ) , ( ListVentWidth * .15 ) , ( ListVentWidth * .25 );
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse

Post by jvtecheto »

Hola Bayron.

Muchisimas gracias. Funciona perfecto. aunque esto ya es opinion mia

el mas antiguo Browse realiza bien el calculo de las columnas y el mas moderno debes de definirlo por codigo.
no es muy logico la verdad.

Mr. Rao, posibilidad de arreglar esto ?

Saludos.

Jose.
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by cnavarro »

Al margen del comentario que pueda hace Mr Rao, creo que eso ocurre cuando aparece el "bitmap" que indica el orden en el que está ordenada esa columna
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by nageswaragunupudi »

Mr. Jose

Code: Select all

Como puedo hacer que se ajuste al ancho de la columna de texto, en este caso para que se vea bien toda la cabecera.
 
I am surprised that in your case the header does not look good. But it should automatically look good.
Hope you are testing with FWH1905 or later.

I tried to reproduce the problem at my end, but it is working correctly.
This is the test program I tried here.

Code: Select all

#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oBrw, oFont

   USE CUSTOMER VIA "DBFCDX"
   FW_CdxCreate()

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 600,400 PIXEL TRUEPIXEL FONT oFont TITLE FWVERSION

   @ 40,40 XBROWSE oBrw SIZE -60,-40 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "STRZERO(ID,4)","FIRST","LAST" ;
      HEADERS "CODIGO" ;
      CELL LINES NOBORDER ;
      FOOTERS AUTOSORT

   WITH OBJECT oBrw
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 
Image

Here the header appears correctly with automatic calculation of column widths.

How can you help me to reproduce the problem?

We try our best to ensure that XBrowse should work as expected without any extra code by the programmer for colsizes, alignments, number formats, etc.
Regards

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

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by nageswaragunupudi »

I did another test. I created a DBF similar to your image above.
This is the program:

Code: Select all

#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oBrw, oFont

   CreateDBF()

   USE TEST VIA "DBFCDX"

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 500,300 PIXEL TRUEPIXEL FONT oFont TITLE FWVERSION

   @ 40,40 XBROWSE oBrw SIZE -40,-40 PIXEL OF oDlg ;
      DATASOURCE "TEST" AUTOCOLS ;
      CELL LINES NOBORDER ;
      FOOTERS AUTOSORT

   WITH OBJECT oBrw

      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil

function CreateDBF()

   local aStru := ;
      {  { "CODIGO", "C", 4, 0 } ;
      ,  { "CIF",    "C", 9, 0 } ;
      ,  { "NOMBRE", "C",20, 0 } ;
      }

   DBCREATE( "TEST", aStru, "DBFCDX", .T., "TST" )
   FW_ArrayToDBF( ;
      {  { "0001", "", "HOTEL PLAYA" } ;
      ,  { "0002", "016308363", "ANOZ, DEMETRIO" } ;
      ,  { "0003", "", "WIEDEMAN" } ;
      ,  { "0004", "", "KREIGER"  } ;
      ,  { "0005", "", "MODESTO"  } ;
      } )

   FW_CdxCreate()

   CLOSE TST

return nil
 
Image

Even this is working correctly.
How can you help me to recreate your problem?

Did you by any chance set the column widths yourself in your program?
Regards

G. N. Rao.
Hyderabad, India
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by jvtecheto »

Hi. Mr. Rao

First of all thank you for your effort and attention in helping me. I value it very much.
You are right that it works well in your examples, I do not get the arrow, look at the image.

Image

the code that fails me is this

Code: Select all

@ 2, 0 XBROWSE oBrw  DATASOURCE cAlias ;
          COLUMNS "Codigo", "cif", "Nombre", "direc" ;
          HEADERS "CODIGO", "C.I.F.", "NOMBRE", "DIRECCION" CELL LINES ;
          WHEN cAlias->( LastRec() ) > 0 OF oWndObr
 
I don't know what the problem may be, anyway thank you very much

Jose.
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by nageswaragunupudi »

Please click on headers to see arrows
Regards

G. N. Rao.
Hyderabad, India
User avatar
jvtecheto
Posts: 357
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse(SOLUCIONADO)

Post by jvtecheto »

nageswaragunupudi wrote:Please click on headers to see arrows
Yes. Thanks. :D
Fwh 19.06 32 bits + Harbour 3.2dev(r2011030937)+ Borland 7.4 + FivEdit
Post Reply