From: MENON Jean-Francois Date: 2002-06-20T00:33:33+09:00 Subject: tk question and tk solution hello, - the question: I don't remember how to change (or hide) the mouse cursor with tk. (and what other cursors I can use) - the solution: in a recent question about tix balloons, I had an answer that works well, if there is tk-ext installed on my host.(thx Mr Nagai) But I realise that I could do the same with pure tk code, wich is more portable. So I send you an example code in the hope it could be useful for someone :-> require 'tk' def help(ev) if $top.nil? $top=TkToplevel.new {geometry "+#{ev.x_root}+#{ev.y_root}" overrideredirect true} l= TkLabel.new($top,'text'=>'coucou','background'=>'yellow').pack else $top.geometry("+#{ev.x_root}+#{ev.y_root}") end $top.deiconify end def destroy_help $top.withdraw end $root= TkRoot.new frame= TkFrame.new.pack b= TkButton.new($frame,'text'=>'texte').pack b.bind('Enter',proc { | ev| help(ev)}) b.bind('Leave',proc { destroy_help}) Tk.mainloop -- _________________________________________ / do you play Go? \ |http://jeanfrancois.menon.free.fr/rubygo | \ / ----------------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || ||