[gtkada] Re: Scrolled window problem

Alex R. Mosteo alejandro at mosteo.com
Wed Nov 30 12:00:22 CET 2005


Alex R. Mosteo wrote:
> Ok, I'm having this situation where I have a scroll window which doesn't 
> respond to mouse drags. I'm sure I've done this before without problems 
> so it's probably some silly omission in my part, but I'm unable to spot 
> it. It's getting on my nerves.
> 
> So this is a simple window which contains a Scrolled_Window which in 
> turns contains a Tree_View. The data in the tree is properly displayed, 
> the scroll bars appear whenever the data is too much for the window 
> size. It's simply that when I try to move the scroll bars with the 
> mouse, they won't move. Initialization code follows:

Ok, I'm answering to myself just in case someone would find this useful 
in the future.

In the end this was the classical silly mistake due to inexperience. I 
had another window with the modal property set to true. I was being 
utterly confused because it didn't prevented me to move, resize and 
bring forward other windows, so I didn't realized for some time that 
that was the problem.

Best,

Alex.

> 
> Gtk_New (This.Scroll);
> Set_Policy (This.Scroll, Policy_Automatic, Policy_Automatic);
> Set_Shadow_Type (This.Scroll, Shadow_In);
> 
> -- Tree initialization omitted.
> 
> Add (This.Scroll, This.Log_Tree);
> 
> Gtk_New (X.Window);
> 
> Initialize (X.Window, Window_Toplevel);
> Set_Position (X.Window, Win_Pos_None);
> Set_Modal (X.Window, False);
> Set_Title (X.Window, Kind);
> 
> Add (X.Window, This.Scroll);
> Show_All (X.Window);
> 
> Is there some signal I must connect or something like that? I don't 
> remember doing so in past occasions. Any clue is welcome.
> 
> Kind regards,
> 
> A. Mosteo.




More information about the gtkada mailing list