pbs-software / pbs-modelling

R package PBSmodelling - GUI tools made easy: interact with models and explore data
2 stars 1 forks source link

label widget - argument 'wraplength' behaviour not consistent with UG description #71

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have a second issue, probably just a mistake in the user guide.
On page 50, the entry for "Label" states this:

wraplength......maximum number of characters to fit per line; 
text which is longer is split over multiple lines.

in the following instruction, I wanted to split the text onto 2 lines.
As the string is 43 characters long, I tried values of wraplength of
around 30, but this created a label only 4 characters wide! So I set 
it to 200 and it does the job, but it seems to me the measurement unit 
for wraplength is not the number of characters. Maybe it is pixels?

DC (2010-07-22)

label text="Duration of each part of a cycle (minutes):"  \
   sticky=W wraplength=200 pady=20 padx=10

Original issue reported on code.google.com by rowan.ha...@dfo-mpo.gc.ca on 22 Jul 2010 at 5:33

GoogleCodeExporter commented 9 years ago
I've replicated the error on my machine. The behviour is not consistent with 
the User Guide description. The argument 'wraplength' should refer to 
characters 
not pixels. ACB will need to debug.

Aside: Looking at 'widgetDefs.r', I notice that some arguments for widgets have 
class 'integer', some "integerVector'. Even similar arguments like 'width' may 
be
defined as 'integer' in one widget and 'integerVector' in another. Also some 
have 'grep' checks(?), some don't. I suggest that ACB go through all 
definitions 
and standardise as needed. 

Merci, RH

Original comment by rowan.ha...@dfo-mpo.gc.ca on 22 Jul 2010 at 5:41

GoogleCodeExporter commented 9 years ago
label's width was integerVector - should just be integer (there was even a 
grep=^[0-9]$" which disallowed multiple values)

table, and data on the other hand, needs an integerVector which specifies 
individual column widths when multiple are given

*Bug: object widget: when the object is a matrix, multiple widths are not 
recognized and produces a tcl error; this works fine with data.frames though.

*Bug: matrix widgets should handle multiple widths, but only accept a "integer" 
rather than "integerVector"

Original comment by alex_goo...@mofo.ca on 3 Jan 2011 at 9:53

GoogleCodeExporter commented 9 years ago
The wraplength argument value is given in pixels (specified in ttklabel docs: 
http://www.tcl.tk/man/tcl/TkCmd/ttk_label.htm#M-wraplength)
We however use the standard tklabel which doesn't specify the units in the 
docs; however, it's clearly using pixels - so we should state that in the UG)

*Action to take: update the UG to specify units are in pixels

Original comment by alex_goo...@mofo.ca on 3 Jan 2011 at 9:59

GoogleCodeExporter commented 9 years ago
RH: Looks like the UG still specifies units in 'characters' (2011-09-09).

Original comment by rowan.ha...@dfo-mpo.gc.ca on 9 Sep 2011 at 10:04

GoogleCodeExporter commented 9 years ago
UG says 'characters' and tcl/tk implements characters, so I'm closing this 
issue.

Original comment by rowan.ha...@dfo-mpo.gc.ca on 9 Nov 2012 at 4:48