FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour browse default right justified
Posts: 598
Joined: Tue Apr 15, 2008 04:51 PM
browse default right justified
Posted: Tue Sep 02, 2008 03:48 AM

Auto Right justified does't seem to work in xbrowse if using trans() in the browse. Just wanted to let you know.
It seems to center the picture.

hag

Thank you

Harvey
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
browse default right justified
Posted: Tue Sep 02, 2008 09:11 AM

XBrowse automatically right justifies if the Data is of numeric or date type, if we "ALLOW" xbrowse to know the correct data type.

When you have used Transform( yourdata, yourpicture), you have already converted the data into a character data. Therefore XBrowse sees it as character data only. You have never given an opportunity to XBrowse to know the real data type.

Actually, with XBrowse there is no need to convert the data into character value like for other browses.

Straight away provide your data as it is to xbrowse. If you want, provide the picture in the picture clause. XBrowse then knows the correct data type and intellgently invokes other features. Please remove all Tranforms and just provide the data.

Example:
ADD TO oBrw <expression> PICTURE '999,999.99' HEADER <header>

If you are assigning to individual codeblocks in the OOPS style, never directly assign to bStrData. Instead

oCol := oBrw:AddCol()
oCol:bEditValue := { || alias->fieldname }
oCol:cEditPicture := "999,999.99"

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion