Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Seeking resize solutions
(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.

I'm trying to redraw the tabs for DTF when the window is resized,
stacking/unstacking as needed. Initially, I was having an issue with
just the width being incremented by 12 pixels in a vicious cycle,
ie,

- get the Config event
- post a debounce timer (so I'm not redrawing everything all the time),
- then redraw when the timer fires.

All well and good, except after the initial redraw, even when there
are no tabs to draw, I get "phantom" Config events that seem to
recycle the same width/height increments,
which causes my redraws to keep expanding the window ad nauseum,
even if there are no tabs defined.
I managed to solve this by using a width threshold of 13 pixels,
so these phantoms would be ignored (tho I think that's been
causing another issue).

Now I'm trying to implement support for tabs on the sides, which
would require redrawing when the window height changes, and I'm
getting the phantoms again, except that the recycled heights
don't seem quite as predictable as the width, and are relatively
large (50 - 80 pixels).

Does anyone have a solution to this issue that will
clamp the Config events ? My debouncer doesn't seem to help,
regardless of the delay I use. As far as sample code, I can
only point to the current Tk::DynaTabFrame - just look
at ConfigDebounce() and reduce the width threshold below
13.

TIA,
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 majordomo@lists.stanford.edu

Report this thread to moderator Post Follow-up to this message
Old Post
Dean Arnold
01-10-05 08:58 PM


Re: Seeking resize solutions
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 majordomo@lists.stanford.edu

Report this thread to moderator Post Follow-up to this message
Old Post
Dean Arnold
01-10-05 08:58 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PerlTk archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:44 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.