FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Colored multiline gets
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Colored multiline gets
Posted: Tue Nov 28, 2006 03:55 PM

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

Posts: 80
Joined: Tue Nov 15, 2005 03:38 PM
Colored multiline gets
Posted: Tue Nov 28, 2006 05:41 PM
Hi.
Evans.
I hope that this source.
To View All xcommand REDEFINE GET,
Open file FiveWin.ch Say REDEFINE GET Command
:-)
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
}

************
*/
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Colored multiline gets
Posted: Tue Nov 28, 2006 06:16 PM
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
Posts: 114
Joined: Tue Feb 14, 2006 08:13 AM
Colored multiline gets
Posted: Tue Nov 28, 2006 06:18 PM

Thank You All for you kind replies.

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

Greetings from Greece

Evans

Continue the discussion