[Linux]Change title of a window
Posted: Fri Jan 02, 2004 11:30 am
Code updated for 5.20+ (same as SetWindowTitle())
Hi again!
Here is some small code for changing the title of a window.
regards,
Christian
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
Christian