Setting larger font for my wxPython app - across the board, but cannot increase windwos general font settings

Hi,

I am building some realtime report for a customer which is to be put up on a large LCD
screen. The report screen consists of a ListCtrl_virtual. I tried SetFont on the Ctrl,
but that didn't work.

The customer says he does not want to enlarge the font in windows, because it looks very bad.

I don't have access to such a large screen.

Is there a way I can enlarge all fonts in one go for my app?

Thanks,
Antonio

Not really. Most widgets will 'inherit' the font set on their parent at the time that the widget is created, but it is not perfect.

···

On 4/16/12 2:03 PM, Antonio Gom�z Soto wrote:

Hi,

I am building some realtime report for a customer which is to be put up on a large LCD
screen. The report screen consists of a ListCtrl_virtual. I tried SetFont on the Ctrl,
but that didn't work.

The customer says he does not want to enlarge the font in windows, because it looks very bad.

I don't have access to such a large screen.

Is there a way I can enlarge all fonts in one go for my app?

--
Robin Dunn
Software Craftsman

Op 19-04-12 23:05, Robin Dunn schreef:

···

On 4/16/12 2:03 PM, Antonio Gom�z Soto wrote:

Hi,

I am building some realtime report for a customer which is to be put up on a large LCD
screen. The report screen consists of a ListCtrl_virtual. I tried SetFont on the Ctrl,
but that didn't work.

The customer says he does not want to enlarge the font in windows, because it looks very bad.

I don't have access to such a large screen.

Is there a way I can enlarge all fonts in one go for my app?

Not really. Most widgets will 'inherit' the font set on their parent at the time that the widget is created, but it is not perfect.

Robin,

do you have some recommendation? I am using listctrl and lictrl_virtual almost exclusively,
so enlarging those might me get to 95% of what I want to accomplish

Thanks,
Antonio.

Have you tried SetFont on the frame? E.g., in my frame initialization I put:

self.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL))

Patrick

Op 20-04-12 00:58, Patrick Maher schreef:

Have you tried SetFont on the frame? E.g., in my frame initialization I put:

self.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL))

Patrick

Patrick,

thanks, this is giving me encouraging results!

Antonio.

···

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Op 20-04-12 00:58, Patrick Maher schreef:

Have you tried SetFont on the frame? E.g., in my frame initialization I put:

self.SetFont(wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL))

Patrick

Patrick,

thanks, this is giving me encouraging results!

I have used functions before for settings drop targets over a whole frame and children before, maybe you could do something similar

def setFont(parent,*args,**kwargs):

if hasattr(parent,“SetFont”):

parent.SetFont(*args,**kwargs)

if hasattr(parent,“Children”):

for child in parent.Children:

setFont(child,*args,**kwargs)

setFont(ref_to_frame,9,wx.SWISS,wx.NORMAL,wx.NORMAL)

···

On 20 April 2012 07:16, Antonio Goméz Soto antonio.gomez.soto@gmail.com wrote:

Antonio.

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Paul,

The wx documentation says: “by default, all windows use their own default attributes. However if some of the parents attributes are explicitly (that is, using SetFont and not SetOwnFont) changed and if the corresponding attribute hadn’t been explicitly set for this window itself, then this window takes the same value as used by the parent.” So I’m wondering how your code can have a different effect to simply saying:

parent.SetFont(…)

Patrick

Paul,

The wx documentation says: "by default, all windows use their own default
attributes. However if some of the parents attributes are explicitly (that
is, using SetFont and not SetOwnFont) changed and if the corresponding
attribute hadn't been explicitly set for this window itself, then this
window takes the same value as used by the parent." So I'm wondering how
your code can have a different effect to simply saying:

parent.SetFont(...)

Ah, I didn't realise this was the behaviour of SetFont, that's pretty
useful! In that case, ignore my post :slight_smile:

···

On 21 April 2012 23:44, Patrick Maher <patrick@maher1.net> wrote:

Patrick

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

The parent's font must be set before the child is created, as that is when the attribute inheritance happens.

···

On 4/21/12 3:44 PM, Patrick Maher wrote:

Paul,

The wx documentation says: "by default, all windows use their own
default attributes. However if some of the parents attributes are
explicitly (that is, using SetFont and not SetOwnFont) changed and if
the corresponding attribute hadn't been explicitly set for this window
itself, then this window takes the same value as used by the parent." So
I'm wondering how your code can have a different effect to simply saying:

parent.SetFont(...)

--
Robin Dunn
Software Craftsman

Would it possible to use that recursive function to set the cursor of a
whole frame and all children after creation? ( .SetCursor with
wx.StockCursor object)

···

On 23 April 2012 17:38, Robin Dunn <robin@alldunn.com> wrote:

On 4/21/12 3:44 PM, Patrick Maher wrote:

Paul,

The wx documentation says: "by default, all windows use their own
default attributes. However if some of the parents attributes are
explicitly (that is, using SetFont and not SetOwnFont) changed and if
the corresponding attribute hadn't been explicitly set for this window
itself, then this window takes the same value as used by the parent." So
I'm wondering how your code can have a different effect to simply saying:

parent.SetFont(...)

The parent's font must be set before the child is created, as that is when
the attribute inheritance happens.

--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@**
googlegroups.com <wxPython-users%2Bunsubscribe@googlegroups.com>
or visit http://groups.google.com/**group/wxPython-users?hl=en&lt;http://groups.google.com/group/wxPython-users?hl=en&gt;