There are 2 items in the Table Properties, Width combo: Percent and "
I want Percent and Pixels. Your Actions demo is correct and I'm using it almost verbatim.
Opening my existing docs set it to: "
Any ideas?
Table Properties form/Width combo has Pixels and "
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
A measuring units displayed in RichViewActions dialogs are defined in RVAControlPanel.UnitsDisplay.
If the combobox shows '', the units are inches.
In the ActionTest demo, TForm3.RVAControlPanel1MarginsChanged contains the following code:
This code changes the units displayed in RichViewActions dialogs (and in rulers) to the units defined for SRichViewEdit1. Because of this, the units may change after loading a file. To prevent this, just remove this code.
If the combobox shows '', the units are inches.
In the ActionTest demo, TForm3.RVAControlPanel1MarginsChanged contains the following code:
Code: Select all
cmbUnits.ItemIndex := ord(SRichViewEdit1.UnitsProgram);
SclRVRuler1.UnitsDisplay := TRulerUnits(SRichViewEdit1.UnitsProgram);
SclRVRuler2.UnitsDisplay := TRulerUnits(SRichViewEdit1.UnitsProgram);
-
- Posts: 206
- Joined: Thu Sep 15, 2005 1:41 am
- Location: California
Changed UnitsProgram to pixels to get Table Width in pixels
Commenting those lines worked but only when I set UnitsProgram to pixels in design mode.
Whatever UnitsProgram is set to determines one of the Table Properties/width combo items, the other is always Percent.
I'm ok with it although it would be nice to have the display in inches but have the option to set the table width in pixels.
Whatever UnitsProgram is set to determines one of the Table Properties/width combo items, the other is always Percent.
I'm ok with it although it would be nice to have the display in inches but have the option to set the table width in pixels.
-
- Site Admin
- Posts: 17553
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It is because the demo contains this line in TForm3.FormCreate:Commenting those lines worked but only when I set UnitsProgram to pixels in design mode.
Code: Select all
RVAControlPanel1.UnitsDisplay := SRichViewEdit1.UnitsProgram;
It would be too difficult to define units for each dialogs separately.
Currently, there are the following rules:
- if units<>pixels, dialogs show large sizes in these units, small sizes - in points
- border widths can be always defined in pixels (if RVAControlPanel.PixelBorders=True). Currently, it is highly recommended for ScaleRichView, because its drawing precision is 1 pixel, so defining border widths in points makes no sense; in future, we will increase a drawing precision.
The only exception was made for pictures. Their size can be defined in %, the specified units and pixels. Sorry, I do not think that a table size should be an exception like this.
PS: probably, we will allow entering units directly in editors, like in MS Word, but not in near future.