lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Managing XRC control widths


From: Greg Chicares
Subject: [lmi] Managing XRC control widths
Date: Fri, 4 May 2018 00:12:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

I just committed some changes to 'skin*.xrc':
  e565bb9b 2018-05-03 Rework date and age controls
  8e40029c 2018-05-03 Rework top part of "Client" tab
  c8549a23 2018-05-03 Arrange date and age controls more logically
After those changes, we have three controls, stacked vertically (good),
all the same width (good), but wide enough for about fifteen digits (not
so good):

                  000000000111111
                  123456789012345
       Birthdate [_______________]    <-- date picker
       Issue age [_______________]    <-- spin control
  Retirement age [_______________]    <-- spin control

This commit
  27da5859 Make birthdate and age controls a little less wide
    Default spincontrol width exceeds default datepicker width, but these
    spincontrols are for ages that can't have more than three digits;
    therefore, used default datepicker width and set spincontrols to a width
    of zero, so that XRC will grow them to the same width as the datepicker.
seems to be the best I can do: here, with 'wine', it makes them all
about eleven digits wide, because the datepicker is so wide.

I'm trusting that XRC does its best to choose a default size that's
consistent with each end user's date format (except for 'wine'). My own
preferred format (long == short) is the spartan '1999-01-31', but after all
my forefathers were Lakonians, so molon labe. Corporate users may have
something like "Friday, January 1, 1999" forced upon them; we'll just have
to test this on their machines.

BTW, I tried <size>1,-1</size>, but on my console appeared:
  wxSpinCtrl "IssueAge": initial width 2 is too small, at least 14 pixels 
needed.
  wxSpinCtrl "RetirementAge": initial width 2 is too small, at least 14 pixels 
needed.
I tried using <size>7,-1</size>, but that gave curious warnings:
  wxSpinCtrl "IssueAge": initial width 14 is too small, at least 14 pixels 
needed.
  wxSpinCtrl "RetirementAge": initial width 14 is too small, at least 14 pixels 
needed.
which suggest an off-by-one error in wxXRC diagnostics. I was about to use
<size>10,-1</size> and ask for an enhancement that would let me indicate
that I really want no positive width, but then I tried to think like Vaclav,
and realized that <size>0,-1</size> already works perfectly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]