Hi all,
I am trying to write (Ruby and Tk 8.3) a TkPanel containing two TkPanels
where the sash between the panels can be dragged by the mouse to move
the border between the panels.
I have my sub panels placed with ‘width’=>-1 making a small gap between.
I have used bind to call procedures at the correct times. (And set up
’cursor’=>??? On the panels, so that is correct).
How can I find out the size of the panels, and convert the x,y to parent
panel coordinates, so I can calculate the new ‘relheight’=> values?
panel.height gives me 0 for all heights ???
What are the x and y passed into the do_motionY call here?
@panel.bind(‘B1-Motion’, proc{|x,y| do_motionY(x,y)}, “%x %y”)
Are they screen co-ordinates? If so how can I get the top top of @Panel?
This effort is starting to look like there is a need for a decent TK in
Ruby book. TCL/Tk and Perl/Tk are all very well, but… I don’t know
them.
Regards - and thanks for your help.
Ian
···
–
Ian - posting to a Newsgroup. Please remove everything to reply.