Page 1 of 1

Greek Fonts in dialogs

Posted: Sun Jun 15, 2014 5:18 pm
by jorjio
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:=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"

Re: Greek Fonts in dialogs

Posted: Sun Jun 15, 2014 6:48 pm
by Antonio Linares
REQUEST HB_CODEPAGE_ELWIN

function Main()

...

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

Re: Greek Fonts in dialogs

Posted: Sun Jun 15, 2014 8:58 pm
by jorjio
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()
...

Re: Greek Fonts in dialogs

Posted: Sun Jun 15, 2014 11:34 pm
by Antonio Linares
We use "ESWIN" for Spanish codepage. All codepages supported by Harbour are listed here:

https://github.com/harbour/core/tree/ma ... c/codepage

Re: Greek Fonts in dialogs

Posted: Mon Jun 16, 2014 2:19 am
by nageswaragunupudi
This is the code to select Greek

Code: Select all

   REQUEST HB_Lang_EL
   REQUEST HB_CODEPAGE_ELWIN

   HB_LangSelect("EL")
   HB_SetCodePage("ELWIN")
 
I do not know about greek fonts.

Re: Greek Fonts in dialogs

Posted: Mon Jun 16, 2014 3:41 pm
by jorjio
Hi,
Can you tell me if any ch, dll or file is needed for the greek language?

Re: Greek Fonts in dialogs

Posted: Tue Jun 17, 2014 5:43 am
by Antonio Linares
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