Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1158
IText.Tabs it works???
posted

Hi guys,
Happy new year to all.

Anyone have used IText.Tabs?

Putting a content into  an IGridCell I have had necessity of put the first Tab Stop to an exact position...

I used IText.Tabs.AddTab() without results:
IText txt
txt.Indents.First = 0;
txt.Indents.Left = 10;
txt.Tabs =
new Tabs();// also tried without this line
txt.Tabs.AddTab(7,
LeaderFormat.Dots);
txt.Tabs.AddTab(17,
LeaderFormat.Dots);
txt.Tabs.AddTab(27, LeaderFormat.Dots);
txt.Tabs.AddTab(30,
LeaderFormat.Dots);
txt.AddContent("-\tTitle");

After some test I've solved with this code:
IText txt
txt.Indents.First = 0;
txt.Indents.Left = 10;
txt.Tabs.Default.Offset = 16;
txt.AddContent("-\tTitle");

It works, but in the future if I will need having tabs to various positions as I will make?
Mistake something?
Escapes me something?
it is a bug?

Any ideas are apreciated.

Thanks

Davide Dolla
neoDD69