viewtopic.php?f=3&t=7283&hilit=richedit
he asked the same I ask now
the possibility to subscript or superscript and change uppercase smallcase on trichedit class
haupt tried to make a modify on setattribute method but it not run
- Code: Select all Expand view
#define CFE_SUBSCRIPT 0x00010000 /* Superscript and subscript are */
#define CFE_SUPERSCRIPT 0x00020000 /* mutually exclusive */
#define CFM_SUBSCRIPT CFE_SUBSCRIPT + CFE_SUPERSCRIPT
#define CFM_SUPERSCRIPT CFM_SUBSCRIPT
//----------------------------------------------------------------------------//
METHOD SetAttribute2( lBold, lItalic, lUnderline, lStrikeOut, lSub, lSup, lOnOff ) CLASS TRichEdit
local nMask, nEffects
DEFAULT lBold := .f., ;
lItalic := .f., ;
lUnderline := .f., ;
lStrikeOut := .f., ;
lSub := .f.,;
lSup := .f.,;
lOnOff := .t.
nMask := nOR( If( lBold, CFM_BOLD, 0 ), If( lItalic, CFM_ITALIC, 0 ), ;
If( lUnderline, CFM_UNDERLINE, 0 ), ;
If( lStrikeOut, CFM_STRIKEOUT, 0 ),;
If( lSub, CFM_SUBSCRIPT,0),;
If( lSup, CFM_SUPERSCRIPT,0) )
nEffects := nOR( If( lBold, CFE_BOLD, 0 ), If( lItalic, CFE_ITALIC, 0 ), ;
If( lUnderline, CFE_UNDERLINE, 0 ), ;
If( lStrikeOut, CFE_STRIKEOUT, 0 ),;
If( lSub, CFE_SUBSCRIPT,0),;
If( lSup, CFE_SUPERSCRIPT,0) )
RESetAttribute( ::hWnd, nMask, nEffects, lOnOff )
::Change()
return nil
can you help me ?