'Swapping' slaves in grid manager?!? 
Author Message
 'Swapping' slaves in grid manager?!?

I have a Tcl toplevel window with a number of thumbnail photos in
them, all slaves managed by the grid manager. What I want to do is
click on one pic, then holding the mouse button and drag it over
another pic. This should result in the photos 'swapping' positions.
The problem is that when I instruct the grid manager to put the
dragged photo in the row and column of the photo the mouse pointer
is now over, strange things happen, the photo that was in that spot
dissappears or the new (dragged) photo is placed in a new row/column!

Does anyone have an idea how this could be solved? Another thing:
can someone explain the syntax of the '-' ,'^' ,and 'x' characters
when used with the grid manager? An example would be greatly
appreciated.

-Michel Schudel

---------------------------------------------------
"I haven't lost my mind, I have it backed up
on tape somewhere."

---------------------------------------------------



Mon, 20 Mar 2000 03:00:00 GMT  
 'Swapping' slaves in grid manager?!?

 Michel Schudel (Michel Schudel) wrote in article

Quote:
>I have a Tcl toplevel window with a number of thumbnail photos in
>them, all slaves managed by the grid manager. What I want to do is
>click on one pic, then holding the mouse button and drag it over
>another pic. This should result in the photos 'swapping' positions.
>The problem is that when I instruct the grid manager to put the
>dragged photo in the row and column of the photo the mouse pointer
>is now over, strange things happen, the photo that was in that spot
>dissappears or the new (dragged) photo is placed in a new row/column!

    You have to do a forget on the photos then issue the grid command to put
them in where you want them.

Quote:
>Does anyone have an idea how this could be solved? Another thing:
>can someone explain the syntax of the '-' ,'^' ,and 'x' characters
>when used with the grid manager? An example would be greatly
>appreciated.

    I recommend not using them, use the options instead!

****************************************************************************
* Gerald W. Lester                       | Voice:  +1 (504)-889-2784       *
* Computerized Processes Unlimited, Inc. | FAX:    +1 (504)-889-2799       *

* Metairie, LA 70001                     | Web:    http://www.cpu.com      *
****************************************************************************



Tue, 21 Mar 2000 03:00:00 GMT  
 'Swapping' slaves in grid manager?!?



Quote:
> Michel Schudel (Michel Schudel) wrote in article

<<SNIP>>

>>Does anyone have an idea how this could be solved? Another thing:
>>can someone explain the syntax of the '-' ,'^' ,and 'x' characters
>>when used with the grid manager? An example would be greatly
>>appreciated.

>    I recommend not using them, use the options instead!

I think he asked how to use them, not if he should use them!
Setting up a grid is a littlebit like using tables in html:

To get something like this:

      ----------------
                        |   b1    | b2 |
                        ----------|    |
                        | b3 |xxxx|    |
                        |    |----|    |
                        |    | b4 |    |
                        ----------------

Just do it like this:

grid .b1 - .b2
grid .b3 x  ^
grid  ^  b4 ^

- prolongs the widget on the left horizontaly (b1 in this case)
^ prolongs the widget on top vertically
x leaves an empty space

just make sure that there's something to prolong!

Ciao!

P.S. I recomend using them! :^)

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1




------END GEEK CODE BLOCK------
Please add the magic word "PLONK" to your subject, when you are sending email
to me! Otherwise your mail will bounce!



Wed, 22 Mar 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. minor annoyance with Tkinter's grid manager

2. An incompatibility problem with 4.2's grid manager

3. Q: A grid into a grid doesn't expand

4. Continuing problems with 'grid'

5. Question on 'grid'

6. Core dump on Tk 'grid' command

7. BUG?: grid interpretation of '^'

8. HELP:Stacking windows with a 'olwm'-windows manager

9. VHDL-Code for SPI-Slave, I'm looking for

10. 'Expanding' with the grid manager!

11. Can't load Tk into a slave interpreter

12. Error Can't create swap file

 

 
Powered by phpBB® Forum Software