I just checked some code in a project which populates a Font menu and
a font PopupMenu subclass. Neither of them have to fiddle with the
TextEncoding on my system, so I may have you steered you wrong on
that.
For example, here's the portion of the EnableMenuItems code that
checks the currently selected font in an editfield:
u = FontCount - 1
for i = 0 to u
FontName(i).enable
FontName(i).Checked = False
if FontName(i).Text = ef.SelTextFont Then FontName(i).Checked = True
next
The menu is populated in a separate function when the application starts up.
I hope that's helpful somehow.
At 10:19 PM +0100 11/28/06, Youri wrote:
Dennis,
For the moment I checked my code and changed it for :
dim s As string
s = "Arial,Arial Black,Verdana,Helvetica,Futura,Monaco,Courier"
for i = 1 to 7
self.ListBox1.addrow NthField(s,",",i)
if NthField(s,",",i) = self.Cal.propFontAgenda then
n = self.listbox1.LastIndex
end if
next
This works perfectly. But this is not the list of all installed
fonts coming from "outside" my app. So maybe that you are right
about text encoding. But this is a topic, I would much appreciate a
little... guidance ;-)
TIA,
Regards,
Youri
Dennis Birch wrote:
You might want to check to see if TextEncoding is causing problems.
Seth,
Thanks for the bit of code, but the index (n) returned is always
"0" even thought the font name is rigth.
I did put a test as
MsgBox "Font name is " + myFontName + " n = " + str(n)
But it seems that there might be a pb with my code to populate the listbox.
If I check how many times the max value of i = f.count, I get 31,
but my listbox shows many more fonts (about 60).
However, when I selct any of the font between 32 and 60 the font
is not recognised.
Could this be the problem in my listbox?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>