Re: Tk does not generate my virtual event...



On 30/04/2012 22:19, Joe English wrote:
Possible solution: depends on the circumstances. Note that
none of [update], [update idletasks], [event generate ... -when tail],
[after 0 [list event generate ...]], or [after idle ...]
will do the trick. The only way to tell when a widget has
*really* been created is to wait for the first <Configure>
event (and there are corner cases where even *that* can fail!)

What are those corner cases?

I know that other possibilities include waiting for <Visibility>, <Map>
or <Expose>. However, <Visibility> is only issued on X11, I'd suspect
that <Map> would have similar problems to <Configure>, and <Expose>
might wait a bit too long unless the window really is bound for display
(and you can't [bind] it before 8.4).

Donal.
.



Relevant Pages

  • Re: Tk does not generate my virtual event...
    ... Donal K. Fellows wrote: ... will do the trick. ... The only way to tell when a widget has ... --Joe English ...
    (comp.lang.tcl)
  • Re: Tk does not generate my virtual event...
    ... will do the trick. ... The only way to tell when a widget has ... event (and there are corner cases where even *that* can fail!) ... Why destroying a window makes the parent to be created? ...
    (comp.lang.tcl)
  • Re: Tile labelframe oddities and a few questions
    ... On Jun 16, 10:34 am, Joe English ... It looks like you were just looking at the wrong kind of widget. ... or by the "fill" element (for sublayouts). ... You just need to set options for the sublayout ...
    (comp.lang.tcl)
  • Re: No more Friday Night "free" baseball !!!
    ... > QuiGon wrote: ... >> Ever heard of mass production...? ... See here's the trick: The next time ... I have an black market widget workshop in my basement. ...
    (alt.sports.baseball.bos-redsox)
  • Re: Changing the font of ttk::entry
    ... failed to do likewise for the font. ... What's the trick? ... is there a more up to date documentation site? ... Although it does not have the -font option for the entry widget. ...
    (comp.lang.tcl)