|
From: Joe E. <jen...@fl...> - 2004-12-28 00:14:37
|
Jeff Hobbs wrote: > [JE]: > > With this usage, it's preferable that the "-width" option > > always mean the same thing, instead of sometimes being in > > pixels and sometimes being in characters depending on the > > values of other options. > > While I would agree with this, the core evidently decided that > the same consistency should be held ... for images. In any > case, how do you handle the addition of an image to the mix? > Does that calculate into the whole, added separately, ??? The requested width and height of the image part of the label is taken from the width and height of the image. Longer answer: the "label" element is a combination of the "text" and "image" elements, with additional options "-compound", "-anchor", and "-space" that specify how the two parts should be arranged. For "-compound top" and "-compound bottom", the requested height is the height of the image, plus "-space", plus the height of the text element, and the requested width is the maximum of the widths of the two subelements. Similarly for "-compound left" and "-compound right", except width and height are swapped. For "-compound text" and "-compound image", only the appropriate subelement is used. If -width >= 0, the requested width of the text element is -width characters. Otherwise, it's the the larger of the width of the string and the absolute value of -width (i.e., negative -widths specify a minimum size for the text element). --Joe English jen...@fl... |