Colored multiline gets

Colored multiline gets

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

Postby HATHAL » Tue Nov 28, 2006 5:41 pm

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

Re: Colored multiline gets

Postby Enrico Maria Giordano » Tue Nov 28, 2006 6: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
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests