Page 1 of 1

Colored multiline gets

Posted: Tue Nov 28, 2006 3:55 pm
by E. Bartzokas
Hi all,

Can someone tell me if we can have a multicolored and multifont (if possible) GET object, such as when editing a memo, inside a dialog ?

Any code samples will be welcome if answer is positive.

Thank you
Regards
Evans

Posted: Tue Nov 28, 2006 5:41 pm
by HATHAL
Hi.
Evans.
I hope that this source.
To View All xcommand REDEFINE GET,
Open file FiveWin.ch Say REDEFINE GET Command
:D
Regards
hathal.
------
#include "FiveWin.ch"
function Main()
local oGet,ODLG,fntArial
local cText :=""
DEFINE FONT fntArial NAME "Arial" SIZE 20, 20
DEFINE DIALOG oDlg RESOURCE "MemoEdit"
REDEFINE GET oGet VAR cText MEMO ID 1 OF oDlg FONT fntArial COLOR "R+,GR"
REDEFINE BUTTON ID 2 OF oDlg ;
ACTION MEMOWRIT("Test.TXT",cText)
REDEFINE BUTTON ID 3 OF oDlg ;
ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT fntArial
return nil

/*
RESOURCE file.rc
********
MemoEdit DIALOG 67, 36, 187, 105
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "MemoEditing"
FONT 6, "MS Dialog"
{
EDITTEXT 1, 4, 6, 180, 77, ES_RIGHT | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
DEFPUSHBUTTON "ok", 2, 18, 87, 36, 14
PUSHBUTTON "exit", 3, 136, 87, 36, 14
}

************
*/

Re: Colored multiline gets

Posted: Tue Nov 28, 2006 6:16 pm
by Enrico Maria Giordano
E. Bartzokas wrote:Hi all,

Can someone tell me if we can have a multicolored and multifont (if possible) GET object, such as when editing a memo, inside a dialog ?

Any code samples will be welcome if answer is positive.

Thank you
Regards
Evans
You have to use TRichEdit class.

EMG

Posted: Tue Nov 28, 2006 6:18 pm
by E. Bartzokas
Thank You All for you kind replies.

I guess I will follow the TRichEdit class though,
as suggested above.

Greetings from Greece

Evans