Hi,
I would like to establish the length of a wx.TextCtrl instance in terms of
number of characters (as opposed to pixels) i.e. if I only want the date
entered then I want the width of the wx.TextCtrl instance to be no more than
the largest possible entry e.g. possible formats might be limited to
dd-mm-yyyy, dd/mm/yyyy, dd/mmm/yyyy, dd mmm yyyy. So from these
possibilities, the maximum width would be 12 characters wide. But wxPython
seems to specify widths in pixels, which seems to be very low level and
specific.
Is there any way to specify the width of a control in multiples of character
width? Failing this, what would be the mechanism to calculate the width in
pixels given a string length and the current font?
Thanks
Peter
Peter Milliken
Software Engineer
ResMed
Phone: +61 2 9886-5059
Fax: +61 2 9878-5564
Warning: Copyright ResMed. Where the contents of this email and/or attachment includes materials prepared by ResMed, the use of those materials is subject exclusively to the conditions of engagement between ResMed and the intended recipient.
This communication is confidential and may contain legally privileged information. By the use of email over the Internet or other communication systems, ResMed is not waiving either confidentiality of, or legal privilege in,the content of the email and of any attachments.
If the recipient of this message is not the intended addressee, please call ResMed immediately on +61 2 9886 5000 Sydney, Australia.