FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Greek Fonts in dialogs
Posts: 14
Joined: Tue Sep 10, 2013 08:08 PM
Greek Fonts in dialogs
Posted: Sun Jun 15, 2014 05:18 PM
Hi,
How can I get greek fonts in a dialogue? I have a very small sample here but I can not see the greek characters
FUNCTION parts(nRc,ooDlg)
*-------------------------------------------
LOCAL aRc:={space(5),space(25),0,0,0,0,0,0,space(30),space(15),space(15),space(30)}
local oDlg, oFont

if !empty(oodlg)
oodlg:disable()
endif
DEFINE FONT oFont NAME "Arial Greek" SIZE 4,14
select products

if nRc<>0
GOTO nRc
for i=1 TO products->( FCOUNT() )
aRc[i]:=products->( FIELDPUT( i, FIELDGET(i)) )
next
endif

if !empty(oodlg)
oodlg:disable()
endif
DEFINE BRUSH obrush COLOR CLR_HGRAY // CLR_HGRAY


DEFINE DIALOG odlg FROM 5,7 TO 41,70 Title "ÄÉÁ×ÅÉÑÉÓÇ ÅÉÄÙÍ-" +;
iif(nRc == 0, " Íåï åßäïò ", "ÌåôáâïëÝò ") FONT oFONT // ; BRUSH obrush
@ 1, 2 SAY "ÑÜöé:" OF oDlg
@ 1, 15 GET aRc[1] OF oDlg PICTURE "@X!"

@ 2, 2 SAY "Åßäïò:" OF oDlg
@ 2, 15 GET aRc[2] OF oDlg PICTURE "@!XXXXXXXXXXXXXXXXXXXXXXXXX"
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Greek Fonts in dialogs
Posted: Sun Jun 15, 2014 06:48 PM

REQUEST HB_CODEPAGE_ELWIN

function Main()

...

HB_LangSelect( 'ELWIN' )
HB_SetCodePage("ELWIN")

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 14
Joined: Tue Sep 10, 2013 08:08 PM
Re: Greek Fonts in dialogs
Posted: Sun Jun 15, 2014 08:58 PM

Hi,
it doesn't work. It says "invalid language selected"

include "fivewin.ch"

include "Common.ch"

DEFINE K_ENTER (13)

REQUEST HB_CODEPAGE_ELWIN

!***********
!
! Function: main()
!
!
!
*!
***********

FUNCTION main()
*----------------------

LOCAL odbf,oget,odlg,obtn1,obtn2,obtn3,obtn4,;
obrw,midos,;
ret_val := .F.,;
oget1,oget2
LOCAL oClient1
LOCAL oMenu23, oBrushM1
LOCAL company:="MAKRIS"

HB_LangSelect( 'ELWIN' )
HB_SetCodePage("ELWIN")

if !empty(oClient1)
RETURN( NIL )
endif

open_files()
...

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Greek Fonts in dialogs
Posted: Sun Jun 15, 2014 11:34 PM
We use "ESWIN" for Spanish codepage. All codepages supported by Harbour are listed here:

https://github.com/harbour/core/tree/master/src/codepage
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Greek Fonts in dialogs
Posted: Mon Jun 16, 2014 02:19 AM
This is the code to select Greek
Code (fw): Select all Collapse
   REQUEST HB_Lang_EL
   REQUEST HB_CODEPAGE_ELWIN

   HB_LangSelect("EL")
   HB_SetCodePage("ELWIN")

I do not know about greek fonts.
Regards



G. N. Rao.

Hyderabad, India
Posts: 14
Joined: Tue Sep 10, 2013 08:08 PM
Re: Greek Fonts in dialogs
Posted: Mon Jun 16, 2014 03:41 PM

Hi,
Can you tell me if any ch, dll or file is needed for the greek language?

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Greek Fonts in dialogs
Posted: Tue Jun 17, 2014 05:43 AM

No, it is not needed.

Simply do as Rao explained you:

REQUEST HB_Lang_EL
REQUEST HB_CODEPAGE_ELWIN

function Main()

...

HB_LangSelect("EL")
HB_SetCodePage("ELWIN")

Please try it, thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion