| Store | Cart

Re: [TCLCORE] TIP496: entry widget help text options

From: Brian Griffin <bria...@easystreet.net>
Wed, 11 Apr 2018 06:28:43 +0000
On Apr 10, 2018, at 23:17, Steve Landers <ste...@digitalsmarties.com<mailto:ste...@digitalsmarties.com>> wrote:

Forwarded for Francois, who is having trouble posting to SF

-------- Message transféré --------
Sujet : Re: AW: [TCLCORE] TIP496: entry widget help text options
Date :  Tue, 3 Apr 2018 22:29:19 +0200
De :    Francois Vogel <fvog...@free.fr><mailto:fvog...@free.fr>
Pour :  Zaumseil René <RZau...@kkg.ch><mailto:RZau...@kkg.ch>, tcl-...@lists.sourceforge.net<mailto:tcl-...@lists.sourceforge.net> <tcl-...@lists.sourceforge.net><mailto:tcl-...@lists.sourceforge.net>

Le 06/03/2018 à 13:27, Zaumseil René a écrit :
>> A few issues I have found with the latest implementation:>>>> a. tk::entry does not appear tohonor center justification for the>> placeholder.>> Test case:>>    package require Tk>>    pack [entry .e]>>    .e configure -placeholder {Here the placeholder text} -justify center>>>> b. ttk::entry, ttk::combobox and ttk::spinbox - the placeholder does not>> appear to honor -justify at all.>> Test case:>>    package require Tk>>    pack [ttk::combobox .ct]>>    .ct configure -placeholder {Here the placeholder text}>>    .ct configure -values {Value1 Value2 Value3}>>    .ct configure -justify right> Good catch. I only tested with strings not bigger then widget width.> And a test script:>> pack [entry .e -textvariable a -justify right]> set a {Here the looooooong text}>> The text is *not* displayed right justified. bug or feature?

I have thought at this and here is my opinion: indeed there is no point
in specifying justification of the text in an entry widget when this
text is larger than the available display space. What governs the
display in this case rather is the xview.

However, for a placeholder text, one could expect the text to honor
-justify even if it does not fit in the allotted space, because for the
placeholder text there is no control of the xview.

So a perfectionist could sustain that for the entry widget text it's not
a bug, but for the placeholder text it is a bug. One could imagine an
entry widget packed in a larger GUI that the user is able to resize.
Depending on the GUI size, the placeholder text could be partially
hidden or fully visible. The perfectionist would expect this entry
widget to honor -justify even if only partially visible.

Then other people could answer that the programmer needs to use -width
to ensure that the placeholder text be always visible. I'm inclined to
think that is a good enough answer.

In short I would not require this glitch to be mandatorily corrected
before voting the TIP and merging it's corresponding implementation. I
think it's anyway debatable whether it needs to be "fixed" or not.

Other opinions perhaps?

If no voice raises I will launch the vote soon (on an updated TIP
documenting the above reasoning).


I concur with your analysis and conclusion.


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Tcl-Core mailing list

Recent Messages in this Thread
Brian Griffin Apr 11, 2018 06:28 am
Steve Landers Apr 11, 2018 06:13 am
Messages in this thread