comp.lang.ada
 help / color / mirror / Atom feed
* Title in Main Window with GtkAda
@ 2010-11-12 14:20 ldries46
  2010-11-12 15:57 ` Robert Matthews
  0 siblings, 1 reply; 6+ messages in thread
From: ldries46 @ 2010-11-12 14:20 UTC (permalink / raw)


I just want to change the Title in the main window of a Gtk ADA application 
at the moment of some action, like adding a File name as is done in Fi Word. 
Is that possible. IF so how can do I do it?
 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Title in Main Window with GtkAda
  2010-11-12 14:20 Title in Main Window with GtkAda ldries46
@ 2010-11-12 15:57 ` Robert Matthews
  2010-11-12 16:06   ` Phil Thornley
  0 siblings, 1 reply; 6+ messages in thread
From: Robert Matthews @ 2010-11-12 15:57 UTC (permalink / raw)


ldries46 wrote:

> I just want to change the Title in the main window of a Gtk ADA
> application at the moment of some action, like adding a File name as is
> done in Fi Word. Is that possible. IF so how can do I do it?

Call Set_Title in Gtk.Window, should do the trick.

Bob Matthews




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Title in Main Window with GtkAda
  2010-11-12 15:57 ` Robert Matthews
@ 2010-11-12 16:06   ` Phil Thornley
  2010-11-13  4:38     ` ldries46
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Thornley @ 2010-11-12 16:06 UTC (permalink / raw)


On Nov 12, 3:57 pm, Robert Matthews <ign...@ramatthews.free-
online.co.uk> wrote:
> ldries46 wrote:
> > I just want to change the Title in the main window of a Gtk ADA
> > application at the moment of some action, like adding a File name as is
> > done in Fi Word. Is that possible. IF so how can do I do it?
>
> Call Set_Title in Gtk.Window, should do the trick.

That works for me too (MS Windows XP and 7). But the GtkAda RM says:
"Change the title of the window, as it appears in the title bar. Note
that on some systems you might not be able to change it. "

So it isn't guaranteed to work.

Cheers,

Phil



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Title in Main Window with GtkAda
  2010-11-12 16:06   ` Phil Thornley
@ 2010-11-13  4:38     ` ldries46
  2010-11-13  8:09       ` Phil Thornley
  0 siblings, 1 reply; 6+ messages in thread
From: ldries46 @ 2010-11-13  4:38 UTC (permalink / raw)


The problem seems to be the following:

Glade-2 creates a windows variable of the type name_Access which is itself 
a create by
type name_Access is access all name_Record'Class;
In the initiate routine Glade uses Set_Title with this type but when use 
Set_Title somewhere else it seems that Set_Title cannot use this type.
It seems to me that I need a type name_Record. I just cannot find a way to 
get a variable of that type from the type name_Access.

For the record my OS is Windows 7 64 bit

"Phil Thornley" <phil.jpthornley@gmail.com> schreef in bericht 
news:083482db-f5f3-461d-96ef-d794c032ed96@q36g2000vbi.googlegroups.com...
> On Nov 12, 3:57 pm, Robert Matthews <ign...@ramatthews.free-
> online.co.uk> wrote:
>> ldries46 wrote:
>> > I just want to change the Title in the main window of a Gtk ADA
>> > application at the moment of some action, like adding a File name as is
>> > done in Fi Word. Is that possible. IF so how can do I do it?
>>
>> Call Set_Title in Gtk.Window, should do the trick.
>
> That works for me too (MS Windows XP and 7). But the GtkAda RM says:
> "Change the title of the window, as it appears in the title bar. Note
> that on some systems you might not be able to change it. "
>
> So it isn't guaranteed to work.
>
> Cheers,
>
> Phil 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Title in Main Window with GtkAda
  2010-11-13  4:38     ` ldries46
@ 2010-11-13  8:09       ` Phil Thornley
  2010-11-13 10:11         ` ldries46
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Thornley @ 2010-11-13  8:09 UTC (permalink / raw)


On Nov 13, 4:38 am, "ldries46" <bertus.dr...@planet.nl> wrote:
> The problem seems to be the following:
>
> Glade-2 creates a windows variable of the type name_Access which is itself
> a create by
> type name_Access is access all name_Record'Class;
> In the initiate routine Glade uses Set_Title with this type but when use
> Set_Title somewhere else it seems that Set_Title cannot use this type.
> It seems to me that I need a type name_Record. I just cannot find a way to
> get a variable of that type from the type name_Access.
>
> For the record my OS is Windows 7 64 bit

The variable passed to Set_Title must be a Gtk.Window.Gtk_Window,
which is declared as
   type Gtk_Window is access all Gtk_Window_Record'Class;

I've never used Glade, so I can't help with that.  You will only be
able to call Set_Title for this window where the window variable is
visible.

Cheers,

Phil



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Title in Main Window with GtkAda
  2010-11-13  8:09       ` Phil Thornley
@ 2010-11-13 10:11         ` ldries46
  0 siblings, 0 replies; 6+ messages in thread
From: ldries46 @ 2010-11-13 10:11 UTC (permalink / raw)


Finally did it.
Only by creating a new procedure in the package that initiated the main 
window and calling that from the package where the change was to be 
initiated. I do think the less nice way, but it worked.

"Phil Thornley" <phil.jpthornley@gmail.com> schreef in bericht 
news:daadc30a-e1b7-4b11-8fdf-73f33c2163c0@k5g2000vbn.googlegroups.com...
> On Nov 13, 4:38 am, "ldries46" <bertus.dr...@planet.nl> wrote:
>> The problem seems to be the following:
>>
>> Glade-2 creates a windows variable of the type name_Access which is 
>> itself
>> a create by
>> type name_Access is access all name_Record'Class;
>> In the initiate routine Glade uses Set_Title with this type but when use
>> Set_Title somewhere else it seems that Set_Title cannot use this type.
>> It seems to me that I need a type name_Record. I just cannot find a way 
>> to
>> get a variable of that type from the type name_Access.
>>
>> For the record my OS is Windows 7 64 bit
>
> The variable passed to Set_Title must be a Gtk.Window.Gtk_Window,
> which is declared as
>   type Gtk_Window is access all Gtk_Window_Record'Class;
>
> I've never used Glade, so I can't help with that.  You will only be
> able to call Set_Title for this window where the window variable is
> visible.
>
> Cheers,
>
> Phil 




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-11-13 10:11 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-12 14:20 Title in Main Window with GtkAda ldries46
2010-11-12 15:57 ` Robert Matthews
2010-11-12 16:06   ` Phil Thornley
2010-11-13  4:38     ` ldries46
2010-11-13  8:09       ` Phil Thornley
2010-11-13 10:11         ` ldries46

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox