Is there a default setting for the table for IndentLeft and IndentRight so that you can change these settings for the whole table as opposed to the current cell?
Cheers
Is there a default setting for the table for IndentLeft and IndentRight so that you can change these settings for the whole table as opposed to the current cell?
Cheers
Hi Julian,
Using the above code to set the max height of a table row, which works except any text that is not visible due to the height restraint overflows into the row below. Any suggestions please?
Regards
Mark
Hi Julian, Any chance you could have a look at this one please.
Hi,
I'm trying to produce some table propery dialogs that replicate (in part) the word properties dialog, but I am finding it extremely difficult! Numerous problems. I have managed to resolve 2 items, but only after an age of trial and error.
I want to be able to
Wrap text round the table
Set the padding for left, right, top and bottom
Deal with alignment of text within cells
etc.
And I would like to do all this by table, row, cell etc
I can see that the WPAT codes would appear to hold the key to this and I keep trying various options and various forms of TParagraph, but I get nowehere.
I have worked out how to set the padding. However, I have noticed that if you set the left padding, it pushes the text across the border of the column to the right. If I set the right padding it appears to be almost twice the size of what you would expect it to be.
Also, if you set the padding of a particular cell, then insert a table into that cell, the new table adopts the padding properties of the cell. I have tried adding code to reset the padding properties for the new inner table, but it does not seem to do anything.
I have searched through the help file, the pdf upgraders docs, the source, the samples and I can find no guidance on how to do this stuff.
Help please.
I am having problems with padding[/list]
Hi Julian,
My restart and continue functions now appear to work reasonably well, but there is one issue I am not sure how to overcome.
If I put a couple of non-numbered paragraphs between numbered paragraphs and then make the last para a numbered para, my continue numbering works but updating the previous list does not update the later list.
Eg
1 Para 1
2 Para 2
3 Para 3
Blah...
Blah...
1 Para 4
My continue numbering function will correctly update para 4 so that it is numbered 4. However, there is no connection between the first list and the second list so that if I add a new para to the first list so that its last numbered para becomes 4, the second list's numbering does not advance. Obviously because wpTools is treating it as a separate list. Is there some property that can be set so that the second list becomes a continuation of the first list?
Regards
Mark
I tried this. Set InMemoryMode to true and assigned a memory stream. Then tried to save the memory stream to a file which resulted in a 0 size pdf.
I will try again. I assume I am right to set InMemoryMode to true?
Do I need to free the memory stream or does wPDF take care of this?
Thanks
Mark
Will do. Thanks. Not sure how I missed that one!
Hi,
I am trying to implement a "Continue Numbering" function as you get with Word's outline/numbering. So for example, if you have the following:
1 Para 1
2 Para 2
3 Para 3
Some arbitrary text
1 2nd para 1
2 2nd Para 2
By clicking on the continue numbering function, I could make the number for 2nd para 1 be number 4 instead of number 1.
The only way I could find of implementing this was by querying the previous paragraphs before 2nd para 1. My code is as follows:
ZitatAlles anzeigen
var par:TParagraph;
ns1, ns2, nl, nl1, nl2, num:integer;
ts:TWPTextStyle;
p: TWPRTFNumberingStyle;
skip:boolean;
begin
wpRichText1.ActiveParagraph.AGet(WPAT_NumberStyle, ns1);
wpRichText1.ActiveParagraph.AGet(WPAT_NumberLevel, nl1);
par:=wpRichText1.ActiveParagraph.PrevPar;
while par<>Nil do
begin
if par.IsNumbered then
begin
par.AGet(WPAT_NumberStyle, ns2);
par.AGet(WPAT_NumberLevel, nl2);
p:=par.RTFProps.NumberStyles.FindParNumberStyle(par, nl, skip);
ts:=p.TextStyle;
ts.AGet(WPAT_NumberText, num);
if (ns2=ns1) and (nl2=nl1) then
begin
wpRichText1.ActiveParagraph.ASet(WPAT_NumberStart, num+1);
wpRichText1.DelayedReformat;
exit;
end;
end;
par:=par.PrevPar;
end;
end;
The function is failing at ts.AGet(WPAT_NumberText, num).
Questions are:
1 In principle, am I going about this the right way and
2 How should I be getting the number of the last outline as the AGet function is not working.
Thanks,
Mark
Hi,
I have tried using TWPDFPrinter to create a pdf. It works fine if I set a filename. If I want to save it to a stream how do I go about this? I am guessing I set inMemoryMode to true, but what then. Do I have to create and assgin a stream to the TWPDFPrinter's stream property or is this auto created. I have tried assigning a stream and I have assumed a stream is auto-created, but in both instances I get a 0 bytes pdf.
Thanks,
Mark
Thanks Leander. I did look at this, but wrote it off for some reason. Will try again
I was afraid you were going to say this.
Thanks
Mark
Hi Julian,
Don't know if you missed this one or if I've raised something problematic, but any chance of a reponse when you have a moment.
Thanks
Mark
Hi Julian,
Took my time testing this one, but it works a treat.
However, once I have my text/data in a stream I can insert it at cursor position, but this is not what I need to do. I need to identify a bookmark and insert at the bookmark position without moving the code.
I have looked at RTFData.insertBlock but does not seem to be what I need and I cannot find any other way of doing it.
Can you let me know what I should be doing to insert the stream data and if possible a little snippet of code.
Thanks
Mark
Hi Julian,
Not quite sure what you mean. I wish to draw objects differently if the mouse is over them. I can only do this within the onTextObjectGetTextEx.
Are you suggesting that I perhaps set some sort of variable (eg ObjUnderMouse:TTextObject) to idenitfy the object within the mousemove event and then reference that in onTextObjectGetTextEx? I've no problem doing that I was just wondering if there was a slightly more elegant solution.
However, how do I detect what is the object under the mouse?
Also, how do I detect whetyher mouse is over opening or closing tag?
Thanks
Hi Julian,
I am custom drawing bookmark tags and field objects etc using the onTextObjectGetTextEx.
From within this event what is the best way of detecting whether the mouse is over and object and if so which one and also whether the mouse is over the opening or closing tag.
Many thanks
Mark
OK. will have a tinker. Thanks.
Hi Julian,
Any chance of a reply on this one.
Thanks,
Mark
Thanks will give it a go.