Page 1 of 1
New Property Suggestion - "ForceFontSize"
Posted: Mon Sep 18, 2006 12:38 pm
by DickBryant
Since many of us use single-line RVE's as data display and/or entry it would be great if the RVE had a property ForceFontSize. If -1 is entered then the RVE behaves as presently, if a positive integer is entered then all text displayed by the RVE is forced to the entered font size - but WITHOUT changing the associated textstyle size in the assocaited RVStyle component.
Thus, with a 12 pixel high RVE one could make an edit to a 30 pt text item and clearly see the text. When displayed back in its "home" RVE it would still be 30 pt.
Posted: Mon Sep 18, 2006 5:47 pm
by Sergey Tkachenko
You can implement this feature using TRVStyle.OnApplyStyle event:
Code: Select all
Sender.TextStyles.Apply(Canvas, rvbdUnspecified, True);
Canvas.Font.Size := NN;
DoDefault := False;
Posted: Sat Sep 23, 2006 2:23 am
by dave novo
Hi Dick,
Why would one care if the text style was modified or not. Is your single line editor (where you want 12pt) using the same rich view stream as your main editor, where you are using 30 pt? i.e. are you shuttling the data back and forth?
Posted: Thu Sep 28, 2006 2:18 pm
by DickBryant
Sergey,
I don't think your suggestion does what I described. Consider two rve's that both use the same rvstyle. Both are onscreen at the same time. One needs to display the styles in their normal form. The other needs to have all font sizes forced to xx.
Dave,
Exactly. My app uses a large table in a 'masterrve' and data is pulled and replaced into this table as the application works with the data. Virtually all of the ancillary rve's use the same rvstyle as the master.
Posted: Thu Sep 28, 2006 9:30 pm
by shmp
Hello Dick,
I would not prefer a ForceFontSize as it would not be a good standard in a VCL.
In your case, it is advisable to use two rvstyle; one for each rve. But before displaying anything in the second rve window, you could dump (or assign) the 'master' style to the second rvstyle. In this case you could change any text item without affecting the 'master'.
I am using this technique because I can always revert to the original style setting. There is however one problem. The second rve is for display only.
Hope this help.
Henry
Posted: Fri Sep 29, 2006 2:01 pm
by DickBryant
Thanks for the suggestion, Henry. I do use the technique you suggest (a second RVStyle) for printing out (or displaying in table format) the information where I offer the option of "font levelling" - i.e. forcing all fonts to a given size to reduce the size of the printout or for better consistency.
However, this will not work in the 'edit controls' because I need the ability to have these controls automatically update the MAIN RVStyle should the user make a font style change when entering data into one of them.