Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    287

    RichText Question

    Code:
    tbSearchResult = RichText.FindText("RichText1", "hi", 1, -1, false, false);
    
    for start,end in tbSearchResult do
    
      if (tbSearchResult) then
          RichText.SetSelection("RichText1", tbSearchResult.Start, tbSearchResult.End);
          tbFormat = {Bold=true};
          RichText.SetSelectionFormat("RichText1", tbFormat, false);
      end
    
    end
    Richtext have many hi words but only one hi word bold

  2. #2
    Join Date
    Jul 2007
    Posts
    287
    Help please...

  3. #3
    Join Date
    Jul 2007
    Posts
    287
    Code:
    tbSearchResult = RichText.FindText("RichText1", "hi", 1, -1, false, false);
    
    while tbSearchResult.Start ~= nil do
    
        RichText.SetSelection("RichText1", tbSearchResult.Start, tbSearchResult.End);
        tbFormat = {Bold=true};
        RichText.SetSelectionFormat("RichText1", tbFormat, false);
        
        tbSearchResult2 = RichText.FindText("RichText1", "hi", tbSearchResult.End, -1, false, false);
        RichText.SetSelection("RichText1", tbSearchResult2.Start, tbSearchResult2.End);
        tbFormat = {Bold=true};
        
        RichText.SetSelectionFormat("RichText1", tbFormat, false);
        break
    
    end
    It's working i repeat 2 times [ tbSearchResult ] , how i can repeat more and working true ?

  4. #4
    Join Date
    Jul 2007
    Posts
    287
    help please ?? i search forum but not found ...

  5. #5
    Join Date
    Jul 2007
    Posts
    287

    Cool

    If it not possible , im stop project .... ??

  6. #6
    Join Date
    Jul 2007
    Posts
    287

    Wink ohhh yes

    Im repair this problem [ Working ~5 hour ]

    Code:
    first = 1
    endx = -1;
    repeat
    nFind = RichText.FindText("RichText1", "hi", first, endx, false, false);
    if nFind ~= nil then
       tbFormat = {Bold=true};
       RichText.SetSelection("RichText1", nFind.Start, nFind.End);
       RichText.SetSelectionFormat("RichText1", tbFormat, false);
       first = nFind.End
    end
    until
    nFind == nil

Similar Threads

  1. Problem with RichText Object
    By azmanar in forum AutoPlay Media Studio 7.5
    Replies: 8
    Last Post: 09-03-2008, 05:22 AM
  2. Richtext and labels
    By grim86 in forum AutoPlay Media Studio 7.5
    Replies: 3
    Last Post: 08-22-2008, 08:46 AM
  3. Test Drive Question
    By jrthom1 in forum Setup Factory 7.0
    Replies: 3
    Last Post: 05-17-2007, 01:45 PM
  4. Math.RandomSeed() question
    By stickck in forum AutoPlay Media Studio 6.0
    Replies: 8
    Last Post: 06-09-2006, 09:42 AM
  5. Need Assistance with Random Question Quiz
    By marc3515 in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 02-16-2003, 06:25 AM

Posting Permissions

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