Home » U++ Library support » RichText,QTF,RTF... » RichEdit questions
Re: RichEdit questions [message #30230 is a reply to message #25472] |
Thu, 16 December 2010 22:55 |
alendar
Messages: 47 Registered: January 2010 Location: Idaho, USA
|
Member |
|
|
I hope this saves someone an hour or two:
void Layout() {
RichEdit::Layout();
long editor_cx = GetSize().cx;
long adaptive_cx = (editor_cx * 8); // Smaller the total, the bigger the text. Increase the constant to decrease the font.
SetPage(Size(adaptive_cx, INT_MAX));
}
This inverts the size of the editor rectangle to the font logical size, i.e., the bigger the editor, the bigger the page, the smaller the font, which is then zoomed to look the same as it did. Make sense?
I gave up on SetZoom, which has some relation to this function, but mostly it just seems to increase the unusable margins or indent on the page, and it can't be regained. The Zoom must be left as default or set to 100 (100%) if you want a 0 margin.
cd7651feeb698f6ac6cec1f6deda5e5b
|
|
|
|
|
RichEdit questions
By: koldo on Thu, 25 February 2010 09:42
|
|
|
Re: RichEdit questions
|
|
|
Re: RichEdit questions
By: koldo on Thu, 25 February 2010 14:42
|
|
|
Re: RichEdit questions
By: fudadmin on Thu, 25 February 2010 15:01
|
|
|
Re: RichEdit questions
By: fudadmin on Thu, 25 February 2010 15:24
|
|
|
Re: RichEdit questions
By: koldo on Thu, 25 February 2010 17:29
|
|
|
Re: RichEdit questions
By: fudadmin on Thu, 25 February 2010 18:49
|
|
|
Re: RichEdit questions
By: mirek on Fri, 26 February 2010 15:26
|
|
|
Re: RichEdit questions
By: koldo on Sun, 28 February 2010 17:58
|
|
|
Re: RichEdit questions
By: mirek on Mon, 01 March 2010 10:47
|
|
|
Re: RichEdit questions
By: koldo on Mon, 01 March 2010 12:08
|
|
|
Re: RichEdit questions
By: mirek on Mon, 01 March 2010 12:10
|
|
|
Re: RichEdit questions
By: mirek on Mon, 01 March 2010 12:20
|
|
|
Re: RichEdit questions
By: koldo on Mon, 01 March 2010 13:07
|
|
|
Re: RichEdit questions
By: mirek on Mon, 01 March 2010 13:35
|
|
|
Re: RichEdit questions
By: alendar on Thu, 16 December 2010 22:55
|
|
|
Re: RichEdit questions
By: alendar on Thu, 16 December 2010 23:37
|
|
|
Re: RichEdit questions
By: koldo on Sat, 14 September 2013 23:43
|
Goto Forum:
Current Time: Mon May 13 20:43:31 CEST 2024
Total time taken to generate the page: 0.01322 seconds
|