Results 1 to 6 of 6

Thread: Need some help searchng through a font box efficently *resolved*

Threaded View

  1. #1

    Thread Starter
    Fanatic Member Graff's Avatar
    Join Date
    Jan 2002
    Location
    Calgary
    Posts
    668

    Need some help searchng through a font box efficently *resolved*

    I'm writing a lite text editor and I have a font box (a custom control I downloaded from http://www.connetica.co.uk) populated with font names. I have it all working now but the font list always says the last used font, which if I have moved to a different part of the text may not necessarly be the font I'm using.

    I've made a loop that goes through the font list to find the apropriate font but it slows down everything while it goes through the list.

    VB Code:
    1. For i = 0 To cboFont(Index).ListCount - 1
    2.            
    3.             If cboFont(Index).ItemFont(i).Name = rtxtDesc(Index).SelFontName Then
    4.                 cboFont(Index).ListIndex = i
    5.                 Exit For
    6.             End If
    7.         Next

    Any ideas on how to speed this up or possibly a better way?
    Last edited by Graff; Dec 31st, 2002 at 04:45 AM.
    If wishes were fishes we'd all cast nets.

Posting Permissions

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



Click Here to Expand Forum to Full Width