I have a problem with something on my Mac not being able to set equal to the value (strg) saved in my preferences with the string value to the fonts name in my popupmenu (DFontPopUp) ONLY in the open event for my preference window. The fonts name is AppleMyongju. I have tried other names to no avail. I have no problem with matching it in my apps open event or when I set the name via me selecting the name in the popup. When I select the font in the pops-menu, its number in the fontcount is 257, however the open event exits the FOR at 260 (of course 1 more than the count) constantly without having found the match.
MnStuff.DispFont is the propertys name and it matches everywhere but that one spot. I even added a msgbox if it wasnt equal, just in case.
[code]//Open event for my preferences window
n= FontCount-1
For i = 0 to n//Fills the popup
DFontPopUp.AddRow Font(i)
DFontPopUp.TextFont = Font(i)
Next
If strg <> “” Then//Never sets it
n = FontCount-1
For i = 0 to n
If DFontPopUp.Text = strg Then Exit For
Next
End If[/code]
//Popupmenu.change event
Dim i As Integer = me.ListIndex
me.TextFont = Font(i)
If me.TextFont <> MnStuff.DispFont then MsgBox "burbb//msgbox
MnStuff.DispFont = ConvertEncoding(me.TextFont, Encodings.SystemDefault)
//My apps open event for the font setting.
ts = Str(pArrayFile(rowcnt))//Font Index rowcnt = 8
ts = DecodeBase64(ts, Encodings.SystemDefault)//Font Index rowcnt = 8
i3 = FontCount -1
For i2 = 0 to i3
If ts = Font(i2) Then//correctly sets it
MnStuff.DispFont = ts
Exit For
ElseIf i2 = i3 And Font(i2) <> ts Then
MnStuff.DispFont = "Arial"
End If
Next