Page 1 of 1

[Linux]Change title of a window

Posted: Fri Jan 02, 2004 11:30 am
by Christian
Code updated for 5.20+ (same as SetWindowTitle())

Hi again!

Here is some small code for changing the title of a window.

Code: Select all

hnd = OpenWindow(0, 0, 0, 300, 300, "Change Window Title", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
If hnd
  ButtonGadget(0, 50, 50, 100, 25, "Change Title")
  
  Repeat
    Select WaitWindowEvent()
      Case #PB_Event_Gadget
        Select EventGadget()
          Case 0
            NewTitle.s = InputRequester("Change Title", "Please enter a new title ...", "")
            If NewTitle.s <> ""
              gtk_window_set_title_(hnd, NewTitle.s)
            EndIf
        EndSelect
        
      Case #PB_Event_CloseWindow
        quit = 1
    EndSelect
    
  Until quit = 1
EndIf

End
regards,
Christian

GetWindowTitle(), SetWindowTitle()

Posted: Thu Apr 15, 2004 4:14 am
by USCode
As of 3.90, there are formal non-API functions to accomplish this now ... assuming these functions make it to the Linux 3.90 version.

GetWindowTitle(#Window), SetWindowTitle(#Window,$Title)

Re: GetWindowTitle(), SetWindowTitle()

Posted: Thu Apr 15, 2004 4:36 am
by sec
do you have a update to 3.90 for linux :D
USCode wrote:As of 3.90, there are formal non-API functions to accomplish this now ... assuming these functions make it to the Linux 3.90 version.

GetWindowTitle(#Window), SetWindowTitle(#Window,$Title)

Posted: Thu Apr 15, 2004 5:20 am
by USCode
USCode:
assuming these functions make it to the Linux 3.90 version
sec:
do you have a update to 3.90 for linux
No one does yet. :wink:

Posted: Thu Apr 15, 2004 4:05 pm
by sec
damm, I (& You) Hope linux version will soon release (that mean)

I guess we can't rush an artist...

Posted: Thu Apr 15, 2004 4:08 pm
by USCode
Yep, I'm looking forward to the 3.90 Linux release as well but like the old saying says "you can't rush art" ... or something like that... :wink:
Hopefully, that art will include using GTK+2.0.