Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image set up

Status
Not open for further replies.

edwong

Programmer
Mar 26, 2003
30
US
Hi,
I have asked a similar question before and I tried different methods of putting the image into the graphical interface. I also read the mini.tcl webpage.
But I still can't make it work. If someone can come up with an entire example of how to put an image into the interface, that will help a lot.
Thx
 
You should have gotten some demo scripts with your installation. Look at the "Tk Demos" and, particularly, "iconic buttons that use bitmaps" and "two labels displaying images". Bob Rashkin
rrashkin@csc.com
 
Here's an example of an embedded graphic.
First you need a GIF image. Others should work, but I have tried a few formats and GIF is the only one I could get to work.

hdrlogo.gif

[tt]
;# UUEncoded as Base64 from GIF Image
set pictureData
Code:
{
R0lGODlh3QBnANUAAAoKGQUFDRcXORAQKBwcRyMjWCsraygoZC4udDExezIySkZGUlFRbv//APb2
EOPjMOzsILy8cNnZQM/PUMbGYDY2iD09mjs7lFRUj0NDp0tLu0hItG9vjE9PxVFRzFtb11ZW12Bg
3mlpsnV10Ftb5F5e62Ji9GZm/2Vl+2lp/3Bw87KygKmpkJ6eoZWVsY6On4yMwHl54IOD0Jqayays
0ouL/4+P96Ki/7Cw9snJ1dnZ/c7O7Pv7//////T0+ufn9CH+CTY0IGNvbG9ycwAh+QQJAAA+ACwA
AAAA3QBnAAAI/gB9CPSBo4aKEiE+KFzIsKHDhxAjSpxIsaLFixgzatzIUaHAHjtuGFQRoqTJkyhT
qlzJsqXLlzBjypxJs6bNmyZ99MAh0saNGzZqCB1KtKjRo0iTKl3KtKnTp1CjSp1KVaiPkDZw6OjB
tQePr2DDih1LtqzZs2jTql3Ltq3bt3Dj8uBZA0dXHTx/6t3Lt6/fv4ADCx5MuLDhw4gTK178U6iN
rT5qpJhMubLly5gza97MubPnz6BDix5NunRlFSpucK1xorXr17Bjy55Nu7bt27hz697Nu7fv37BL
pO6hIwXw47tv4FjOXAXy572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CcKbqGILgyJi1PgFLKhKA8iSANHeDKNi9xxLK2mUIUUbgS3cwL
hofkrI9Ojkqj006ycGsPxIS9VIABUIUEHRQiOp3kc9H26nQzUT0PVahRQu90VE4ZLi2L0kWDI3FR
UEMVNaGjRjX1VFRTVXVVT4db9VU+Y4AvT1hrtfVWXMlqNc5ce/X1V2CDlXNXYYs19lhbU0hBBWab
dfZZaKNtllhkq7X2WjeX3SABBAzw9ltwwxV3XAOoxfZcdI9dNoECBBjgXXjjlXdeet81N11888U1
hQ0KGCAAgAMWeGCCCw74Xn0TVvhUFRIQQGAAIpZ4YoortjggADs=
}
set pic [image create photo -data $pictureData]
unset pictureData

button .picture -image $pic -borderwidth 0 -highlightthickness 0
pack .picture
[/tt]

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top