FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New FWH 16.12
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
New FWH 16.12
Posted: Thu Dec 22, 2016 09:26 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 195
Joined: Sun Jul 22, 2012 07:01 PM
Re: New FWH 16.12
Posted: Thu Dec 22, 2016 10:38 PM

Using xbrowse I set a column cHeader value to the desired header, and in multiword headers I would add a CRLF where I wanted the wrap to occur. This used to work just fine.

For example I could specify "File" + CRLF + "Name", which would then display wrapped:

File
Name

With this build the CRLF is being stripped out of the header and is instead displaying as:

FileName

With no spaces, no wrap.

Robb

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: New FWH 16.12
Posted: Fri Dec 23, 2016 10:07 AM
Robb,

This example behaves fine:
Code (fw): Select all Collapse
#include "fivewin.ch"

function main()

   local oDlg, oBrw

   USE CUSTOMER

   DEFINE DIALOG odlg SIZE 600,300 PIXEL //TRUEPIXEL

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oBrw ;
      DATASOURCE ALIAS()  ;
      COLUMNS "FIRST", "LAST", "STREET" ;
      HEADERS "FIRST" + CRLF + "NAME", "LAST" + CRLF + "NAME" ;
      NOBORDER

   oBrw:bRClicked := { || oBrw:Edit() }
   oBrw:CreateFromCode()

   ACTIVATE DIALOG oDlg CENTERED

return nil


Could you please provide an example that reproduces the error that you described ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: New FWH 16.12
Posted: Fri Dec 23, 2016 11:37 AM

Mr Robb

Are you assigning any value to oBrw:nHeaderHeight?
If so please remove that and see.

When the height is not adequate to display the text in two lines, the entire text is displayed in a single line. So either you specify adequate height or better do not specify the height and allow xbrowse to calculate the required height.

Regards



G. N. Rao.

Hyderabad, India
Posts: 195
Joined: Sun Jul 22, 2012 07:01 PM
Re: New FWH 16.12
Posted: Sat Dec 24, 2016 01:34 AM

No, I am not specifying the nHeaderHeight value.

I just tested the trimmed down sample Antonio provided, and it does behave correctly when compiled on my local machine. I thought it might just be the particular set of values I am setting, so I just copied all the xbrowse values being set in the problematic code and put them in the sample Antonio provided and it still displayed correctly. Which means it is a problem in my local code. I'll figure it out.

There may be one other issue that is telling. I grabbed 16.12 because I wanted to test the new lSeekBar feature, but I cannot get it to work at all. I just tried to enable that in Antonio's example and it isn't working in that code either. I was kind of hoping that the two problems would track together.

Thanks for having a look, for now I'll assume it is my problem.

Robb

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: New FWH 16.12
Posted: Sat Dec 24, 2016 02:41 AM
I grabbed 16.12 because I wanted to test the new lSeekBar feature


Please ensure :
a) Your DBF is indexed
b) Specify the clause AUTOSORT in the XBrowse command
c) Add the line "oBrw:lSeekBar := .t." after XBrowse command and before "oBrw:CreateFromCode()"

Please try this sample first:
Code (fw): Select all Collapse
#include "fivewin.ch"

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER NEW SHARED ALIAS CUST VIA "DBFCDX"
   SET ORDER TO TAG FIRST
   GO TOP

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

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUST" AUTOCOLS ;
      AUTOSORT ; // <--- This is important
      LINES NOBORDER

   WITH OBJECT oBrw
      :lSeekBar   := .t.
      :bClrEdits  := { || { CLR_HRED, CLR_YELLOW } }
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
Regards



G. N. Rao.

Hyderabad, India
Posts: 3022
Joined: Fri Oct 07, 2005 01:45 PM
Re: New FWH 16.12
Posted: Sat Dec 24, 2016 04:25 AM

Here is a critical difference. Many of us actually use resource files, so CreateFromCode() does not apply ( and is not used ).

I posted my code with the lSeekBar feature specific thread, and the discussion seems to have stopped with no resolution to the problem.

Again, the problem is specific to Harbour / MSVC, and clearly relates to fonts ( which you redefine In the xBrowse changes for 16.12 ) because it also blanks out the fonts on the prompts for the button bar.

Tim

Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: New FWH 16.12
Posted: Sat Dec 24, 2016 04:29 AM
resource files, so CreateFromCode() does not apply ( and is not used ).

Yes. It is not necessary. All statements prior to ACTIVATE DIALOG are equivalent to prior to CreateFromCode()

the problem is specific to Harbour / MSVC,

We are looking into it.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion