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
Colored multiline gets
- E. Bartzokas
- Posts: 114
- Joined: Tue Feb 14, 2006 8:13 am
- Location: Corinth, Greece
- HATHAL
- Posts: 77
- Joined: Tue Nov 15, 2005 3:38 pm
- Location: The Kingdom Saudi Arabia -Riyadh
- Contact:
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
}
************
*/
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
}
************
*/
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Colored multiline gets
You have to use TRichEdit class.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
EMG
- E. Bartzokas
- Posts: 114
- Joined: Tue Feb 14, 2006 8:13 am
- Location: Corinth, Greece