[TreeCtrl Q1]What's the default font for TreeCtrlitem?

Maybe nobody notice my previous post, hopefully someone could figure my out? What's the difference of wx.SYS_DEFAULT_GUI_FONT/wx.SYS_SYSTEM_FONT/wx.SYS_SYSTEM_FIXED_FONT/wx.SYS_ANSI_FIXED_FONT ?
and how does wxpython choose the default font for the TreeCtrl item? In my WinXP box, Tahoma is the default font for TreeCtrl item.

======= 2005-05-31 10:19:17 Bruce Who wrote: =======

   I modified my code, and found that the default font for TreeCtrl is Tahoma, but this doesn't seem one of the default fonts, and it's different from other widgets(here , I compare it with a TextCtrl)

   ## Tahoma
   print self.tree_.GetFont().GetFaceName()
   ## Simsun
   print self.text_.GetFont().GetFaceName()
   ## Simsun
   print wx.SystemSettings_GetFont(wx.SYS_DEFAULT_GUI_FONT).GetFaceName()
   ## System
   print wx.SystemSettings_GetFont(wx.SYS_SYSTEM_FONT).GetFaceName()
   ## Fixedsys
   print wx.SystemSettings_GetFont(wx.SYS_SYSTEM_FIXED_FONT).GetFaceName()
   ## Courier
   print wx.SystemSettings_GetFont(wx.SYS_ANSI_FIXED_FONT).GetFaceName()

   And I find a handful of default fonts: wx.SYS_DEFAULT_GUI_FONT, wx.SYS_SYSTEM_FONT, wx.SYS_SYSTEM_FIXED_FONT, wx.SYS_ANSI_FIXED_FONT. They are different from each other. I wonder which one is the real system default font for widgets?

        print default_font
        default_fontname = default_font.GetFaceName()
        default_fontsize = default_font.GetPointSize()
        print default_fontname
        print default_fontsize

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

.

= = = = = = = = = = = = = = = = = = = =
    
Best regards,

    Bruce Who
      2005\-05\-31

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

.

= = = = = = = = = = = = = = = = = = = =
      
Best regards,

    Bruce Who
      2005\-06\-01

Bruce Who wrote:

Maybe nobody notice my previous post, hopefully someone could figure
my out? What's the difference of
wx.SYS_DEFAULT_GUI_FONT/wx.SYS_SYSTEM_FONT/wx.SYS_SYSTEM_FIXED_FONT/wx.SYS_ANSI_FIXED_FONT
? and how does wxpython choose the default font for the TreeCtrl
item? In my WinXP box, Tahoma is the default font for TreeCtrl item.

wxPython/wxWidgets does not choose the fonts. It simply calls the
GetStockObject API and Windows returns a stock font handle. See
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_1t10.asp.
The wx.SYS_*_FONT constants just map to the constants used with
GetStockObject.

I modified my code, and found that the default font for TreeCtrl is
Tahoma, but this doesn't seem one of the default fonts, and it's
different from other widgets(here , I compare it with a TextCtrl)

For the native controls wxWidgets also does not choose the font that
they will use. The native control does.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!