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:
For i = 0 To cboFont(Index).ListCount - 1 If cboFont(Index).ItemFont(i).Name = rtxtDesc(Index).SelFontName Then cboFont(Index).ListIndex = i Exit For End If Next
Any ideas on how to speed this up or possibly a better way?




Reply With Quote