For Programmers: Free Programming Magazines  


Home > Archive > Tcl > June 2006 > How to make the image in menu complete









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to make the image in menu complete
narcy

2006-06-26, 4:21 am

There is a problem when I used menu control.
The image can not show complete

http://www.tclchina.com/bbs/upload/...34512-narcy.gif
<img src=http://www.tclchina.com/bbs/upload/2006621-134512-narcy.gif>

narcy

2006-06-27, 10:00 pm


narcy wrote:
> There is a problem when I used menu control.
> The image can not show complete
>
> http://www.tclchina.com/bbs/upload/...34512-narcy.gif
> <img src=http://www.tclchina.com/bbs/upload/2006621-134512-narcy.gif>


Nobody knew?

eiji

2006-06-28, 4:02 am


narcy wrote:
> narcy wrote:
>
> Nobody knew?


Tell us more about youre image! (format,pixel,...)
And post some code.

I tried this:
####
menu .test
.. configure -menu .test
menu .test.a
..test add cascade -label file -menu .test.a
..test.a add command -bitmap error -label foo -command {console show}
-compound left
####
and it looks nice.
I'm no expert in images and tk-menu's,
but make sure the image has the right format.

Regards,
Sascha

Donal K. Fellows

2006-06-28, 4:02 am

narcy wrote:
> There is a problem when I used menu control.
> The image can not show complete
>
> http://www.tclchina.com/bbs/upload/...34512-narcy.gif


Oh, that bug. We know it too well. :-( It's issue #1329198.
http://sf.net/tracker/?func=detail&...997&atid=112997

It's a mis-feature of Windows that when fancy menu effects are turned
on, it lies about the some of the positioning of the window (IIRC, it's
the mask/clip-area that is wrong) and that makes the image drawing
partially offset. Why this is, I've no idea. Anyone managing to crack
this will be *lauded* by Tk-on-Windows users!

Donal.
Donald Arseneau

2006-06-28, 7:03 pm

"narcy" <jia.liu@ansys.com.cn> writes:

> narcy wrote:
>
> Nobody knew?


Nobody knows how you got that gif, or how the menu icons are supposed
to look. My guess is a known problem:

http://groups.google.com/group/comp...114d157af2ce6eb


--
Donald Arseneau asnd@triumf.ca
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com