FWH 13.05 xbrowse and fonts

User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by nageswaragunupudi »

Richard Chidiak wrote:Mr Rao

The font issue is fixed but there is a bad side effect , the cursor now is focused on the end of the array (last row) instead of the first one

Richard
I tried to reproduce the problem but could not. The cursor is focused in the first row only.
Is it possible for you to post a self contained example which I can compile here and test?

I post here one of the tests I checked, which can be compiled and tested at your end also

Code: Select all

function xbarray()

   local oDlg, oBrw, oFont
   local aData := DIRECTORY( "c:\fwh\samples\*.prg" )

   ASort( adata,,,{ |x,y| x[ 2 ] <= y[ 2 ] } ) // Just to disturb initial sort order

   DEFINE FONT oFont NAME "Segoe UI Light" SIZE 0,-14 ITALIC
   DEFINE DIALOG oDlg RESOURCE "TEST" TITLE FWVERSION
   REDEFINE XBROWSE oBrw ID 101 OF oDlg ;
      COLUMNS 1,2,3,4 HEADERS "File", "Size", "Date", "Time" ;
      DATASOURCE ADATA AUTOSORT  ;
      LINES FONT oFont

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 
rc file

Code: Select all

#include "..\include\WinApi.ch"

TEST DIALOG 6, 15, 306, 227
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "TXBrowse demo"
FONT 8, "MS Sans Serif"
{
 DEFPUSHBUTTON "OK", IDOK, 252, 211, 50, 14
 CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 4, 5, 297, 202
}

 
Regards

G. N. Rao.
Hyderabad, India
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by Richard Chidiak »

Mr Rao

Your code works fine, i have particular processing in certain xbrowse with arrays and there a backwards compatibility has been broken . Not a big deal i have updated my code.

I store the "last" column sorted and retreive it next time they the user enters the browse.

I added a obrw:gotop() and now it is back to normal,

I consider this problem fixed .

May i ask you if you could change some informations from data to classdata in xbrowse so we can assign them once for all ? just like you did for lkinetic

I do not want my users to swap cols , so i have to change my copy of xbrowse at every update

::lAllowColSwapping := .f.
::lAllowColHiding := .f.

if they were classdata much easier and no need to change xbrowse

Thank you for your time.

Ps : The fix for xbrowse is not in the latest fwh 13.05 published by Antonio
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by Antonio Linares »

Richard,

We have migrated FWH this week from SVN to GIT and Rao is still having some minor issues with GIT thats why he had not uploaded all the changes to FWH main repository :-)

Fortunately all FWH changes history are now in GIT, no loose of details at all :-)

BTW, FWH is now in bitbucket.org as it supports private reprositories for free. I encourage users here to use bitbucket, its really great :-) And using GIT all FWH core developers have a full copy of the repository, so even if bitbucket suddenly vanishes, a full copy of the FWH repository (including all historical changes) is kept really safe on each core developer computer :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by nageswaragunupudi »

Changing them to classdata would definitely suit you but not others, who might like to have different settings for different browses.

I shall suggest you a much better way to customize xbrowse to your taste and your programming habits. This is actually my advice to all and what I myself do as a programmer.

Give me a little time.
Regards

G. N. Rao.
Hyderabad, India
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by James Bott »

Richard,
May i ask you if you could change some informations from data to classdata in xbrowse so we can assign them once for all
Two ways you can do this without modifying xBrowse.

1) Subclass xBrowse to your own class and use that class instead of TxBrowse in your app.

Code: Select all

create class MyxBrowse() from TxBrowse
   method New()
endclass

Method New(...) class MyxBrowse
   super:new(...)
   ::lAllowColSwapping := .f. 
   ::lAllowColHiding := .f.
Return self
 
Or,

2) Initialize the browse then pass it to a function that makes the global changes.

Code: Select all

SetupBrowse( oBrw )
   oBrw:lAllowColSwapping := .f. 
   oBrw:lAllowColHiding := .f.
return nil
 
Being a big OOP fan I would use option 1.

Regards,
James
User avatar
Richard Chidiak
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France
Contact:

Re: FWH 13.05 xbrowse and fonts

Post by Richard Chidiak »

James

Thank you

I already use option 2

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Post Reply