Page 1 of 2
FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 11:38 am
by Richard Chidiak
Mr Rao
I have several xbrowse that do not show the font they were supposed to show. They are all used from resources.
With fwh 13.02 (my previous version) this is not happening,
All my xbrowse use the same font retreived from a function , i have put msginfo and the font is correct so i think something wrong has been introduced as per fonts.
Anyone has noticed this ?
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:10 pm
by Antonio Linares
Richard,
How are you assigning the font to the xbrowse ?
Does that function that returns a font, simply return a static variable ? Please show that code, thanks
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:16 pm
by Richard Chidiak
Antonio
whatever font i select , it does not show, i forgot to mention only happens on array browse
Code: Select all
DEFINE FONT aFONT NAME "Segoe UI Light" SIZE 0,-14
REDEFINE XBROWSE oBrw ID 201 OF ODLG ;
COLUMNS 02,34,4,22,31,23,6,7,8,24,21 ;
HEADERS "Date" + CRLF + "Création","Style", "N°" + CRLF + "Devis","Client","Date" + CRLF + "Impression","Téléphone","Total" + CRLF + "HT","Total" + CRLF + "TTC","Total" + CRLF + "Acomptes",;
"Référence","Taux" + CRLF + "Tva";
FOOTERS ;
FONT aFont ;
COLORS {|| { CLR_BLUE, CLR_WHITE } } ;
COLSIZES asize ;
array TVISU lines AUTOSORT
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:32 pm
by Antonio Linares
Richard,
I have modified FWH samples/foldxbrw.prg to use fonts and they look fine. It uses arrays:
foldxbrw.rc is in FWH samples
Code: Select all
#include "FiveWin.ch"
#include "XBrowse.ch"
function Main()
local oDlg, oFld, oBrw1, oBrw2
local aDat1, aDat2, aFont
aDat1:={{"Row1-Col1","Row1-Col2","Row1-Col3"},;
{"Row2-Col1","Row2-Col2","Row2-Col3"},;
{"Row3-Col1","Row3-Col2","Row3-Col3"},;
{"Row4-Col1","Row4-Col2","Row4-Col3"}}
aDat2:={{"ROW1-COL1","ROW1-COL2","ROW1-COL3"},;
{"ROW2-COL1","ROW2-COL2","ROW2-COL3"},;
{"ROW3-COL1","ROW3-COL2","ROW3-COL3"},;
{"ROW4-COL1","ROW4-COL2","ROW4-COL3"}}
DEFINE FONT aFONT NAME "Segoe UI Light" SIZE 0,-16
DEFINE DIALOG oDlg RESOURCE "Test"
REDEFINE FOLDER oFld ;
PROMPTS "One", "Two" ;
DIALOGS "One", "Two" ;
ID 100 OF oDlg
REDEFINE XBROWSE oBrw1 ID 10 OF oFld:aDialogs[ 1 ] ARRAY aDat1 AUTOCOLS FONT aFont
REDEFINE XBROWSE oBrw2 ID 10 OF oFld:aDialogs[ 2 ] ARRAY aDat2 AUTOCOLS FONT aFont
oBrw1:aCols[ 2 ]:nEdittype := EDIT_BUTTON
oBrw1:aCols[ 2 ]:bEditBlock := { || MsgYesNo( "Please select" ) }
oBrw2:aCols[ 2 ]:nEdittype := EDIT_GET
ACTIVATE DIALOG oDlg CENTERED
return nil
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:41 pm
by Richard Chidiak
Antonio
I added xbrowse.prg from fwh 13.02 to my project and now again all my browses look as they should.
I think there is a problem, let us wait for other users.
I am trying to find what has changed between 13.02 (my previous version) and 13.05 on the font part in xbrowse.prg.
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:47 pm
by Antonio Linares
Richard,
Would you mind to test foldxbrw.prg modified as I have commented ?
As soon as I am able to reproduce the behavior, then I can see whats wrong
Re: FWH 13.05 xbrowse and fonts
Posted: Mon Jun 10, 2013 12:54 pm
by Richard Chidiak
Antonio
There is no test.rc in the samples , is it supposed to be from test.dll ?
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 9:52 am
by nageswaragunupudi
Mr Chidiak
I am testing. Please give us a little time.
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 10:11 am
by nageswaragunupudi
Mr Chidiak
The problem is experienced when source is Array and AUTOSORT clause is used. We agree this is bug introduced in FWH 13.05. While we are preparing fix, I shall be very glad if you can remove "AUTOSORT" and confirm that the fonts are properly displayed.
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 11:33 am
by Richard Chidiak
Mr Rao
Thank you for your efforts, i appreciate your help
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 11:34 am
by Richard Chidiak
Mr Rao
You pointed in the correct direction
the problem comes from array and autosort , removing the autosort makes the font display as it should.
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 5:31 pm
by nageswaragunupudi
Mr Chidiak
Please make this correction:
In xbrowse.prg ( version 13.05 ) go to line 11738. You see this code:
Instead of this one line, please substitute the following 3 lines:
Code: Select all
if ::oBrw:lAdjusted // 2013-06-11
::oBrw:Refresh()
endif
we shall be glad if you make this correction in xbrowse.prg and let us know if the problem is solved.
Re: FWH 13.05 xbrowse and fonts
Posted: Tue Jun 11, 2013 5:58 pm
by Richard Chidiak
Mr Rao
The change is OK , problem solved
Thank you
Richard
Re: FWH 13.05 xbrowse and fonts
Posted: Wed Jun 12, 2013 4:32 am
by Richard Chidiak
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
Re: FWH 13.05 xbrowse and fonts
Posted: Wed Jun 12, 2013 7:33 am
by Silvio.Falconi
Richard,
On My appsI saved the sets for xbrowse :
State, Indicator, Horizontal and vertical separators , move columns, sizing colum, Hide and show column, order of column, color grid, backgound, pijama effect, Windows Seven effect and the fonts for header, column data and footers for each xbrowse and all can be set from final user
I think it can be a test sample to create a new method directly into xbrowse class
this sample :
Code: Select all
[Browse]
MVIndicator=1
MVSeparatorH=2
MVSeparatorV=1
MVRidimension=2
MVMove=2
MVPijama=2
MVEffectWin7=1
MVColor1=7031871
MVColor2=204
MVBackGrid=1
MVBrwFont=Tahoma:12:Normal;Tahoma:12:Normal;Tahoma:12:Normal;
MVState=XS1:{{"_nCreationOrders",{1,2,3,4,5,6,7,8,9,10,11}},{"_nRowHeight",28},{"_nWidths",{100,30,70,80,90,80,100,100,100,100,100}},{"_lHides",{.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.,.F.}},{"_cGrpHdrs",{,,,,,,,,,,}},{"_cHeaders",{"Attività","Tipo","Data","Numero","Causale","Conto