FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH 13.05 xbrowse and fonts
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 13.05 xbrowse and fonts
Posted: Wed Jun 12, 2013 09:59 AM
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 (fw): Select all Collapse
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 (fw): Select all Collapse
#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
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: FWH 13.05 xbrowse and fonts
Posted: Thu Jun 13, 2013 10:59 AM

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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH 13.05 xbrowse and fonts
Posted: Thu Jun 13, 2013 11:50 AM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: FWH 13.05 xbrowse and fonts
Posted: Thu Jun 13, 2013 12:25 PM

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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: FWH 13.05 xbrowse and fonts
Posted: Thu Jun 13, 2013 01:51 PM
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 (fw): Select all Collapse
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 (fw): Select all Collapse
SetupBrowse( oBrw )
   oBrw:lAllowColSwapping := .f. 
   oBrw:lAllowColHiding := .f.
return nil


Being a big OOP fan I would use option 1.

Regards,
James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: FWH 13.05 xbrowse and fonts
Posted: Fri Jun 14, 2013 04:19 AM

James

Thank you

I already use option 2

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013

Continue the discussion