Beiträge von jredoc

    My question remains, how to set the current number style? Neither the help file nor code completion functionality illustrates the code to display the first tab when the WPBulletDlg is initially displayed.

    WPRichText1.NumberStyles.SelectedStyle := ???

    Any help would be appreciated.

    WPBulletDlg1.Execute will display a three tab dialog with the caption of the tabs from 0 to 2 = bullets, numbers, outlines. The second tab will be the active tab.

    What is the mechanism to have the first tab (tab 0) being the active tab when the dialog first displays?

    I can find no reference to this in the help file. Delphi 10.1 and wPTools 7

    TIA

    John

    Delphi 10.1 and current versions of WPTools pro bundle and wPDF running on Windows 10.

    After starting the Alone demo and adding a bitmap if I press the "create pdf file" button I receive the error "can not start PDF document" If I add WPDF_Start('..........'); with my pWDF license I receive the same error.

    John

    I have just downloaded and installed for Delphi XE7 the most recent version of wpPDF from the download site, date 27.5.2015. The version number once installed is shown as 4.09.

    There is no Delphi 10 Seattle option currently available. When do you anticipate is wpPDF being compatible with this version of Delphi??

    TIA

    John

    Hello

    stock name __|__account____|____share value_____|______share #_____|______Total value

    stock name __|__account____|____share value_____|______share #_____|______Total value
    ____a________|____1_______|________#__________|________#________|_________#
    ____b________|____1_______|________#__________|________#________|_________#
    ____c________|____1_______|________#__________|________#________|_________#


    With the four columns above, a calculation of the total value of stocks a) b) and c) can be made with
    par.ASetStringProp(WPAT_PAR_COMMAND, 'left(2)*left(1)');


    Question:
    If there are multiple accounts holding a single stock type as in below.

    stock name __|__account____|____share value_____|______share #_____|______Total value
    ____a________|____1_______|________#__________|________#________|_________#
    ____a________|____2_______|___________________|________#________|_________#
    ____a________|____3_______|___________________|________#________|_________#
    ____b________|____1_______|________#__________|________#________|_________#
    ____c________|____1_______|________#__________|________#________|_________#


    Is there a mechanism so that the share value could be calculated for shares of stock a) with the share value being entered for only the first account (see above). For example account 2 would be par.ASetStringProp(WPAT_PAR_COMMAND, 'left(2)up(1)*left(1)');

    TIA
    John

    Support

    I did look at the function TWPFormulaInterface.CalcFormula and saw that it called TWPFormulaInterface.WriteValueToText. In point of fact, I could substitute text := FloatToStrF(Value, ffCurrency,10,2); for text := FloatToStrF(value, ffFixed, 10, 2); on line 241 and get the result that I needed. I also saw that if IWPFormulaInterface.ConvertValueToText was assigned a function then that function would be implemented.

    Once I saw your implementation of DoConvertValueToText, I understood that I could declared the public function DoConvertValueToText and assign IWPFormulaInterface.ConvertValueToText := DoConvertValueToText in the OnCreate event of the form. I was then good to go.

    Thanks for your efforts

    John

    Support:

    In response to my question 2 above

    Zitat

    When text is calculated, the results are expressed as floating point numbers. Is there a mechanism to convert the displayed text in a table cell or a WPTextObj to a currency?

    Your reply was

    Zitat

    Please check out the events OnCalcFormula and BeforeCalcFormula of TWPFormulaInterface

    The HTML help file does list both functions, but I can find no example of the implementation of either function in any of the demos or the WP7manual. Could you please provide an example of how to implement the currency text formatting of table cells with numeric values such as are shown in the CalcTU demo?

    I greatly appreciate your efforts.

    John

    Thanks for the reply

    As per your suggestion, the procedure below iterates through the paragraphs to obtain the table count. I also need to capture the table name associated with each paragraph that is of type wplsTable so it can be displayed to the end user. I have been unsuccessful in this endeavor. The line below with two asterisks seems like the logical solution, but it does not compile.

    Suggestions??

    TIA

    John

    Thanks for the reply.

    I have the calculations and protection issues resolved.

    Using the "create name table" code as a template I have been able to create a number of table templates to automate the table creation process for the end user. Using the WPAT_PAR_Command and WPAT_PAR_Name parameters I have been able to import summary values in a cell from table A to a cell in table B via the recalc process as long as there is no overlap in cell names.

    Question 1: Is there a mechanism to via code to determine the number of tables that are present on a given document? This number would be helpful in assigning unique par names of newly created table cells.

    Question 2: When text is calculated, the results are expressed as floating point numbers. Is there a mechanism to convert the displayed text in a table cell or a WPTextObj to a currency?

    TIA

    John

    Hello

    When I develop a program for the end user, they do not have access to the WP_Tools and WP_Reporter code to create a table as is done in the WP_Reporter calc demo. If the end user is to create a table that performs calculations, they need to be able to assign paragraph names and commands after the table has been created.

    The code at the bottom of this post is executed from a button.OnClick event and will assign a paragraph name and command to individual cells. I can confirm that the changes to the cells are made by displaying the paragraph name and formula by setting WPRichText1.ViewOptions := [wpShowParCalcNames,wpShowParCalcCommands]

    Problems:
    There are two issues that are present after assigning paragraph names and commands to the cells of a table to reproduce the WP_Reporter invoice demo.

    a) The text in the cells to which commands have been assigned can be manually changed. This should not occure and does not in the WP_Reporter invoice demo cells.

    b) If WPRichText1.RecalcText(true,true); is executed from a separate button.OnClick event, the recalculation is not performed.

    Suggestions as to what I am missing?

    TIA

    John


    Code to assign cell name and command is below

    Hello

    I am using Delphi XE5 and WP Tools 7.15

    When I execute the demo you reference, the form editor tab is empty. If I then click another tab and then return to the form editor tab, the text is displayed; however, there is not check box only the word checkbox.

    If I click on the word check box the cursor will navigate to the next text field but the check box field is skipped.

    If I check the "show markers" box the markers display for all of the text fields but not the checkbox

    I do not see how this functionality is correct?

    TIA

    John

    Hello

    In changing from Delphi XE, Windows 7 64 bit, WPTools 6.16 to
    Delphi XE2, Windows 7 64 bit, WPTools 6.25 the following has occured.

    In Delphi XE, the WPToolPanel displayed a raised outer bevel. but in Delphi XE2 if BevelOuter := bvRaised the bevel is still not visible. Changing the Ctl3D properties has no effect. The result is that 4 panels next to each other appear as a single panel.

    Suggestions?

    TIA

    John

    Julian

    You state that
    @CLEARTEXT - deletes the existing string for this page, if not specified the text will be appended
    Do you mean that the entire page is deleted or simply the text starting at coordinates x,y? If the latter then how is the end of the highlighted text determined without a second set of x,y corrdinates?

    In my case, I do not need to add or remove any text, rather I need to define a specific section of text on a single page to highlight or underline, for example three entire lines and the first four words on the fourth line. In this instance I envision clicking on the document to find the start of the highlight and then clicking on the end of the text to define the end of the highlight. Then change either the font color or the canvas color. Is this possible?

    TIA

    John

    In reading the wPDF information found on the web I find the statement - "with the "PLUS" version it is now possible to add text and vector graphics to certain pages of a PDF file (pdf stamping)". I do not find any reference to text highlighting.

    I need allow a user to open an existing PDF file, select specific lines of text and add "highlighting" with a user defined color. Is this possible?

    TIA

    John

    Hello

    a) Does anyone have an example of "best practice" to incorporate an individuals signature image into a WPTools richtext document? If so what would be the best image format.

    b) Does WPTools have the ability to actually capture a signature? If so, could you point me in the right direction.

    TIA

    John

    Julian

    I am now questioning basic functionality.

    If I set ViewOptions.wsShowTab := True and iterate through three paragraphs. The second of which has a tab at the start of the paragraph and (which can be seen visually via the displayed arrow) the tab count for all three paragraphs is 0. I would have expected the tab count for the second paragraph to be 1. (See code below)

    Am I confusing the number of tabs as defined in a style and the actual presence of one or more tabs in a paragraph?

    Do I need to examine the control characters of a paragraph to count the number of times #9 occures. If so, how do I actually examine in code the control characters associated with a paragraph?


    I appreciate your efforts in this matter and apologize for my confusion.

    John

    I have to interrelated questions regarding tab stops.

    A) There are a number of methods in TWPTextStyle that deal with tab stops, but I can not find a method to determine the number of tabs that have been entered at the start of a given paragraph. Is there a way to determine whether tabs have been placed at the front of a paragraph and if so how many?

    b) If I capture the first character of a paragraph that has a single implemented tab stop, it does not display a character, But it also does not appear to be blank. In the following example, evaluating the value copied from the first character location of the paragraph does not display a value, but it also does not evaluate as blank. In the following demo, the first showmessage displays no value, but the second showmessage does not execute

    var
    tempString1: String;
    tempString2: String;

    tempString1 := tempParagraph.GetText;
    tempString2 := Copy(tempString1, 1, 1);

    showmessage(tempIndentString);

    if tempIndentString1 = ' ' then
    showmessage('Test = True');

    From the above, it would appear that the first character location of the paragraph that contains a tab contains some non visual character to represent the tab itself. How can I evaluate that first character location to determine whether it is a tab?

    TIA

    John