Re: HList with image and text - alignment problem



Sorry for the top post.

The best I can do is anchor the text to the SE of the mage -textanchor=>'se', -anchor=>'w'.

A workaround might be to create a composite image/text using Tk::Compound and then specify only the image in your item.

Jack

"Martin Herrmann" <mrh1@xxxxxxx> wrote in message news:8d9e27fb-571e-4f20-bafe-8060ba338ce9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 21 Aug., 20:13, Martin Herrmann <m...@xxxxxxx> wrote:
Hi,

I have a Hlist with some cells in imagetext style:

my $fileS = $picLB->ItemStyle('imagetext', -textanchor => 's', -
anchor=>'w');

$picLB->itemCreate($dpic, $picLB->{filecol}, -itemtype => "imagetext",
-image => $mapivi_icons{$star_icon}, -text => $text, -style =>
$fileS);

This works and the image is placed above the text and the text is
aligned to the left, but the picture is centered inside the cell. How
can I align the picture to the left like the text?
Any ideas?

Regards
Martin

Hmm, either nobody understands my question or nobody has the
answer ...

I try to rephrase the problem:
I managed successfully to display a graphic above a text inside a cell
(which is a Tk::DItem, a Tix Display Item) of an HList.
Additionally I managed to align the text to the left side.
Now I would like to align the graphic also to the left side (but still
above the text).
Maybe this Mapivi screenshot will help:
https://sourceforge.net/apps/mediawiki/mapivi/index.php?title=Main_Page,
see "picture rating visualized with five stars:".
I would like the (orange and gray) stars to be aligned to the left.

Regards
Martin

.



Relevant Pages

  • Re: HList with image and text - alignment problem
    ... but the picture is centered inside the cell. ... I managed successfully to display a graphic above a text inside a cell ... (which is a Tk::DItem, a Tix Display Item) ... Additionally I managed to align the text to the left side. ...
    (comp.lang.perl.tk)
  • Re: Vertical and horizonatal rulers
    ... Actually drawing directly to the Form (or directly into a Picture Box) ... entire game grid into a single large PictureBox ... and therefore which "cell" he is in. ... Scrolling the "larger than the Form" picture Box within the "fully ...
    (microsoft.public.vb.general.discussion)
  • Re: Photos in cells?
    ... Click that cell and select one of the items. ... 5)WITH THE PICTURE SELECTED, ... Microsoft MVP (Excel) ... What i dun understand is how do I build the data validation list on a cell ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Photos in cells?
    ... What i dun understand is how do I build the data validation list on a cell ... in Sheet1 and pick one of the items. ... For more information about Data Validation and Dynamic Range names, ... Otherwise the picture remains unchanged! ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Pls Help - not sure what is causing problem
    ... I don't know how those picture objects got on there and I don't know why your solution works but that's the ticket. ... F11 to bring up the VBE and then Ctrl-G to enter the immediate window ... discover that I am unable to get the autofill/copy pointer ... As I click on the bottom right corner of the cell, ...
    (microsoft.public.excel)