Colored multiline gets

Post Reply
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Colored multiline gets

Post 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
User avatar
HATHAL
Posts: 77
Joined: Tue Nov 15, 2005 3:38 pm
Location: The Kingdom Saudi Arabia -Riyadh
Contact:

Post 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
}

************
*/
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Colored multiline gets

Post 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
User avatar
E. Bartzokas
Posts: 114
Joined: Tue Feb 14, 2006 8:13 am
Location: Corinth, Greece

Post 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
Post Reply