Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    5

    Richtext and labels

    I have some Labels and a empty Richtext, I would like to do this:
    -When I click on the Label in the Richtext box has to appear a document
    -if I click another Label in the Richtext box has to appear a different document

    I believe that this can be done with this command:

    RichText.LoadFromFile("RichText1", "AutoPlay\\Docs\\Mydocument.rtf");

    but when I click on the Label nothing apperas in the richtext box

    how can I do?

    Sorry for my English

  2. #2
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    It's difficult to say what's wrong without an example of the code or ap, and where the actual .rtf file is located. Try placing an error test after the load, maybe that will help in the debugging...

    Code:
    error = Application.GetLastError();
    if (error ~= 0) then
        Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
    end

  3. #3
    Join Date
    Aug 2008
    Posts
    5
    thanks for reply..finally I have done it

    RichText.LoadFromFile("RichText1", "AutoPlay\\Docs\\Mydocument.rtf");
    result = Application.GetLastError();

    now I have another problem...
    Can I change the color of the text in white and also make it a little bigger?

  4. #4
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    Yeah,
    Use RichText.SetSelection("ObjectName", 1, -1) -- this will select the entire text, or you can select whatever portion of the text you desire.

    Then use RichText.SetSelectionFormat("ObjectName", TableOfFormats, true)

    Experiment with these - they should work for you. Use the help file for the exact naming conventions of the formats used.

    good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts