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.
New Property Suggestion - "ForceFontSize"
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can implement this feature using TRVStyle.OnApplyStyle event:
Code: Select all
Sender.TextStyles.Apply(Canvas, rvbdUnspecified, True);
Canvas.Font.Size := NN;
DoDefault := False;
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
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.
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.
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
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
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact:
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.
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.