ajustar columna XBrowse(SOLUCIONADO)

ajustar columna XBrowse(SOLUCIONADO)

Postby jvtecheto » Sun Oct 27, 2019 11:04 am

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(r2104281802) + Borland 7.4 + FivEdit
User avatar
jvtecheto
 
Posts: 577
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse

Postby Bayron » Sun Oct 27, 2019 1:25 pm

Esto puede darte una idea

Code: Select all  Expand view
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
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: ajustar columna XBrowse

Postby jvtecheto » Sun Oct 27, 2019 6:42 pm

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(r2104281802) + Borland 7.4 + FivEdit
User avatar
jvtecheto
 
Posts: 577
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby cnavarro » Mon Oct 28, 2019 12:06 pm

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
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6501
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby nageswaragunupudi » Mon Oct 28, 2019 12:41 pm

Mr. Jose

Code: Select all  Expand view
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  Expand view
#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: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby nageswaragunupudi » Mon Oct 28, 2019 1:07 pm

I did another test. I created a DBF similar to your image above.
This is the program:
Code: Select all  Expand view
#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
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby jvtecheto » Mon Oct 28, 2019 6:58 pm

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  Expand view

@ 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(r2104281802) + Borland 7.4 + FivEdit
User avatar
jvtecheto
 
Posts: 577
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby nageswaragunupudi » Tue Oct 29, 2019 12:04 am

Please click on headers to see arrows
Regards

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

Re: ajustar columna XBrowse(SOLUCIONADO)

Postby jvtecheto » Tue Oct 29, 2019 8:31 am

nageswaragunupudi wrote:Please click on headers to see arrows


Yes. Thanks. :D
Fwh 19.06 32 bits + Harbour 3.2dev(r2104281802) + Borland 7.4 + FivEdit
User avatar
jvtecheto
 
Posts: 577
Joined: Mon Mar 04, 2013 4:32 pm
Location: Spain


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 38 guests