Richedit enhancement
Richedit enhancement
Hi Antonio,
are you thinking about implementing "PARAFORMAT" indenting in richedit control ?
Ciao
Gianni
are you thinking about implementing "PARAFORMAT" indenting in richedit control ?
Ciao
Gianni
Last edited by Gianni on Thu Jun 12, 2008 7:17 am, edited 1 time in total.
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Gianni,
Here you have an example of its use in Class TRichEdit:
Here you have an example of its use in Class TRichEdit:
Code: Select all
METHOD SetAlign( nAlign ) CLASS TRichEdit
DEFAULT nAlign := PFA_LEFT
RESetParaFormat( ::hWnd, nAlign )
::Change()
return nil
Thanks Antonio, but I already know this.
I'm not talking about "align" support, but "indenting" support; so I can implement a ruler like "WordPad".
At this time there is no support for "paraformat" member in bold:
If I open, for example, fiveodbc.rtf included in folder samples, all grids are wrong. Have you this problem too?
I'm not talking about "align" support, but "indenting" support; so I can implement a ruler like "WordPad".
At this time there is no support for "paraformat" member in bold:
Another question:typedef struct _paraformat {
UINT cbSize;
DWORD dwMask;
WORD wNumbering;
WORD wReserved;
LONG dxStartIndent;
LONG dxRightIndent;
LONG dxOffset;
WORD wAlignment;
SHORT cTabCount;
LONG rgxTabs[MAX_TAB_STOPS];
} PARAFORMAT;
If I open, for example, fiveodbc.rtf included in folder samples, all grids are wrong. Have you this problem too?
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Gianni,
Grids seem ok here:
You can easily modify RESETPARAFORMAT() to support those struct members:
Grids seem ok here:
You can easily modify RESETPARAFORMAT() to support those struct members:
Code: Select all
HB_FUNC( RESETPARAFORMAT )
{
PARAFORMAT pf;
memset( ( char * ) &pf, 0, sizeof( pf ) );
pf.cbSize = sizeof( pf );
pf.dwMask = PFM_ALIGNMENT;
pf.wAlignment |= hb_parnl( 2 );
hb_retl( SendMessage( ( HWND ) hb_parnl( 1 ), EM_SETPARAFORMAT, 0,
( LPARAM ) &pf ) );
}
this seems ok, but if you go a little forward (about half rtf) you can see another grid, with longer text inside, that don't resize its height to contain all text. Compare it opening same rtf with WordPad
Thanks.Antonio Linares wrote:You can easily modify RESETPARAFORMAT() to support those struct members:Code: Select all
HB_FUNC( RESETPARAFORMAT ) { PARAFORMAT pf; memset( ( char * ) &pf, 0, sizeof( pf ) ); pf.cbSize = sizeof( pf ); pf.dwMask = PFM_ALIGNMENT; pf.wAlignment |= hb_parnl( 2 ); hb_retl( SendMessage( ( HWND ) hb_parnl( 1 ), EM_SETPARAFORMAT, 0, ( LPARAM ) &pf ) ); }
So, are you not implementing anything about this in near future?
Regards
Gianni
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact: