GtkText bug or misfeature. (GTK 1.1)



Hi!

I've noticed the following curious feature of GtkText:
...snip...
  editor = [GtkWindow new GTK_WINDOW_TOPLEVEL];

  GtkHBox hbox = [GtkHBox new (FALSE, 0)];
  [editor add hbox];
  [hbox show];
  
  contents = [GtkText new (nil, nil)];
  [editor realize];
  [contents realize];
...snip...
  [contents show];
...snip...

...snip...
  [contents insert (fixed, nil, nil, [f contents])];
...snip...

Basically, I'm trying to create a hidden toplevel window that contains
GtkText (+sbar), which is preloaded with the content at creation time.

The first problem is, that I need to add the realize messages manually,
but even worse, with the realize calls, I'm getting 2 (two!) top level
windows, one for the scrollbar, one for the GtkText.

Andreas
P.S.: I know, I could load the content at ``show''-time, but this is
      undesirable, because I would have to cache the contents, flashing,
      etc.

-- 
Win95: n., A huge annoying boot virus that causes random spontaneous system
     crashes, usually just before saving a massive project.  Easily cured by
     UNIX.  See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]