Re: Seeking resize solutions
Dean Arnold <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Dean Arnold wrote: > (WinXP, AS 5.8.3, TK 804.027 + patches) > > Hoping someone can help; this is a bit of a repost of an issue > I had with DynaTabFrame back during the Tk804 beta that has reared > its head again. Note that the issue occured on both WinXP and > Linux, so I'm inclined to believe its either something silly > in my code, or something odd in pTk itself. > After much frustration and fiddling, I've got it working, tho I have no idea why it behaves as it does. The problem and solution (FWIW): As part of drawing tab rows, I append a "pseudo" tab at the end to give the illusion that the tabs are embedded in a row. Initially, I destroyed and recreated these pseudo tabs whenever the tabs were rearranged. Note that these pseudotabs are very simple, just a frame w/ an empty label, and some border decoration. However, for some reason, the destruction and recreation of these pseudotabs during a window resize *while the mouse button was still pressed on the resizer* would cause the window to snap back to its original dimensions. The only way I've been able to solve this is to impose some arbitrary limit on the number of tab rows (currently 20), and precreate the pseudo tabs when the DTF is created, then place() them as needed during a redraw event. I spose it may improve redraw processing time, but I'd certainly love to hear if anyone can explain why pTk behaves this way. This fix seems to have also eliminated the constant stream of Config events. Dean Arnold Presicient Corp. -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]