Keith Vetter 2003-03-12 : after seeing some tcl code on wiki pages that tried to use the "^" and "V" as arrow symbols on buttons[L1 ] , I thought I'd make available simple bitmap images of the four arrows that can be used instead. Remember, you can use Bitmap Editor to tailor the images to exactly how you'd like them.
KPV 2010-07-02 : added diagonal arrows
RS wonders if such arrows should not be added to Tk's built-in bitmaps...
RLH I tried it. Nice little arrows, it would be nice if they could be added.
##+########################################################################## # # arrows.tcl -- bitmaps for eight directional arrows # by Keith Vetter, Mar 12, 2003 # by Keith Vetter, July 2, 2010 added diagonal arrows # image create bitmap ::bit::up -data { #define up_width 11 #define up_height 11 static char up_bits = { 0x00, 0x00, 0x20, 0x00, 0x70, 0x00, 0xf8, 0x00, 0xfc, 0x01, 0xfe, 0x03, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00 } } image create bitmap ::bit::down -data { #define down_width 11 #define down_height 11 static char down_bits = { 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x70, 0x00, 0x70, 0x00, 0xfe, 0x03, 0xfc, 0x01, 0xf8, 0x00, 0x70, 0x00, 0x20, 0x00, 0x00, 0x00 } } image create bitmap ::bit::left -data { #define left_width 11 #define left_height 11 static char left_bits = { 0x00, 0x00, 0x20, 0x00, 0x30, 0x00, 0x38, 0x00, 0xfc, 0x01, 0xfe, 0x01, 0xfc, 0x01, 0x38, 0x00, 0x30, 0x00, 0x20, 0x00, 0x00, 0x00 } } image create bitmap ::bit::right -data { #define right_width 11 #define right_height 11 static char right_bits = { 0x00, 0x00, 0x20, 0x00, 0x60, 0x00, 0xe0, 0x00, 0xfc, 0x01, 0xfc, 0x03, 0xfc, 0x01, 0xe0, 0x00, 0x60, 0x00, 0x20, 0x00, 0x00, 0x00 } } image create bitmap ::bit::upleft -data { #define upleft_width 11 #define upleft_height 11 static char upleft_bits = { 0x00, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0xfe, 0x00, 0xf2, 0x01, 0xe0, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00 } } image create bitmap ::bit::upright -data { #define upright_width 11 #define upright_height 11 static char upright_bits = { 0x00, 0x00, 0xf0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0xf8, 0x03, 0x7c, 0x02, 0x38, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00 } } image create bitmap ::bit::downleft -data { #define downleft_width 11 #define downleft_height 11 static char downleft_bits = { 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0xe0, 0x00, 0xf2, 0x01, 0xfe, 0x00, 0x7e, 0x00, 0x3e, 0x00, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00 } } image create bitmap ::bit::downright -data { #define downright_width 11 #define downright_height 11 static char downright_bits = { 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x38, 0x00, 0x7c, 0x02, 0xf8, 0x03, 0xf0, 0x03, 0xe0, 0x03, 0xe0, 0x03, 0xf0, 0x03, 0x00, 0x00 } } image create bitmap ::bit::star -data { #define plus_width 11 #define plus_height 11 static char plus_bits = { 0x00, 0x00, 0x22, 0x02, 0x24, 0x01, 0xa8, 0x00, 0x70, 0x00, 0xfe, 0x03, 0x70, 0x00, 0xa8, 0x00, 0x24, 0x01, 0x22, 0x02, 0x00, 0x00 } } # Now for a simple demo package require Tk frame .buttons foreach dir {up upright right downright down downleft left upleft} { button .$dir -image ::bit::$dir -command [list set S(msg) "$dir arrow"] } button .star -image ::bit::star -command [list set S(msg) star] label .lbl -textvariable S(msg) -bd 2 -relief sunken set S(msg) "press a button" grid .buttons -row 0 -pady .05i grid .lbl -sticky ew grid columnconfigure . 0 -weight 1 grid .upleft .up .upright -in .buttons -row 0 grid .left .star .right -in .buttons grid .downleft .down .downright -in .buttons return