New FWH 16.12

New FWH 16.12

Postby Antonio Linares » Thu Dec 22, 2016 9:26 am

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 16.12

Postby rhlawek » 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
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: New FWH 16.12

Postby Antonio Linares » Fri Dec 23, 2016 10:07 am

Robb,

This example behaves fine:
Code: Select all  Expand view
#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
User avatar
Antonio Linares
Site Admin
 
Posts: 42068
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FWH 16.12

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 16.12

Postby rhlawek » Sat Dec 24, 2016 1: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
User avatar
rhlawek
 
Posts: 194
Joined: Sun Jul 22, 2012 7:01 pm

Re: New FWH 16.12

Postby nageswaragunupudi » Sat Dec 24, 2016 2: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: Select all  Expand view
#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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: New FWH 16.12

Postby TimStone » Sat Dec 24, 2016 4: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
User avatar
TimStone
 
Posts: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: New FWH 16.12

Postby nageswaragunupudi » Sat Dec 24, 2016 4: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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

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