
Originally Posted by
Karl77
That's now logical to me, because the list gets populated before the UC can read the property.
And after I set the ExcludeList property there is not function to recreate the list.
So no need to check on this.
That seems to be the only correct way to me, and not a workaround.
Because the EnumFontFunction runs twice as you explained, it makes no sense to do the exclusion in that place.
Could you make a very short example on how to CB_DELETESTRING from the Combobox?
I fear to destroy the order when certain items get deleted.
Thank you for that.
I can't code right now. It's just illustration and not tested. But it should give you the idea.
Code:
With FontCombo1
Do
bDelete = False
For i = 0 To .ListCount - 1
If .List(i) = strExcludeList Then
SendMessage .hWnd, CB_DELETESTRING, i, ByVal 0&
bDelete = True
Exit For
End If
Next i
Loop Until bDelete = False
End With