i am new in Fivewin and I'm currently working on transfer old program
written in clipper (and xbase++) to new environment ... and xbrowse.
All my DBF are in CP852 (for compatibility reason!). In HMG (harbour minigui) I simpy add
REQUEST HB_LANG_SL852
REQUEST HB_CODEPAGE_SL852
...
and function hb_OemToAnsi() to
COLUMNS "sifpar",hb_OemToAnsi("naziv"),hb_OemToAnsi("ulica"),hb_OemToAnsi("Naslov");
and in browse I have slovene national characters, but not in fivewin xbrowse. Also, in search field
I can not insert characters like "šđžćč"
Any help (or hint)?
Miran Zupan
- Code: Select all Expand view
- #include "fivewin.ch"
// REQUEST HB_LANG_SLWIN
// REQUEST HB_CODEPAGE_SLWIN
//*** national characters in PARTNER.DBF are in CP852 ***
REQUEST HB_LANG_SL852
REQUEST HB_CODEPAGE_SL852
REQUEST DBFCDX
FUNCTION Main()
LOCAL oDlg, oFont, oBrw
// hb_LangSelect("SL852")
hb_SetCodePage("SL852")
//*** for testing
// FW_SetUnicode( .T. )
MsgInfo(SET(_SET_CODEPAGE))
USE PARTNER NEW VIA "DBFCDX"
INDEX ON sifpar TAG "sifra" TO PARTNER
INDEX ON naziv TAG "naziv" TO PARTNER
INDEX ON ulica TAG "ulica" TO PARTNER
INDEX ON naslov TAG "kraj" TO PARTNER
SET INDEX TO PARTNER
DbSetOrder( "naziv" )
DbGoTop()
IF IsWin8() .or. IsWindows10()
DEFINE FONT oFont NAME "Segoe UI" SIZE 0, -14
ELSE
DEFINE FONT oFont NAME "Arial CE" SIZE 0, -14
ENDIF
DEFINE DIALOG oDlg SIZE 1200,700 PIXEL FONT oFont TRUEPIXEL ;
TITLE "FWH 16.12 : SEEK IN HEADER BAR"
@ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
DATASOURCE "PARTNER" ;
HEADERS hb_OemToAnsi("ćifra"),"Naziv"+CRLF+"partnerja","Naslov","Kraj" ;
COLUMNS "sifpar",OemToAnsi("naziv"),OemToAnsi("ulica"),OemToAnsi("Naslov");
FIELDSIZES 80,400,400,400 ;
CELL LINES NOBORDER FOOTERS AUTOSORT
WITH OBJECT oBrw
:lFastEdit := .T.
:nEditTypes := EDIT_GET
:nMarqueeStyle := MARQSTYLE_HIGHLROW
:nColDividerStyle := LINESTYLE_LIGHTGRAY
:nRowDividerStyle := LINESTYLE_LIGHTGRAY
:nStretchCol := STRETCHCOL_LAST
:lSeekBar := .t.
:bClrEdits := { || { CLR_HRED, CLR_YELLOW } }
:CreateFromCode()
END
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
RETURN nil