Share your advanced PureBasic knowledge/code with the community.
Christian
Enthusiast
Posts: 154 Joined: Mon Dec 08, 2003 7:50 pm
Location: Germany
Post
by Christian » 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.
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
USCode
Addict
Posts: 924 Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle
Post
by USCode » Thu Apr 15, 2004 4:14 am
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)
sec
Enthusiast
Posts: 792 Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:
Post
by sec » Thu Apr 15, 2004 4:36 am
do you have a update to 3.90 for linux
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)
USCode
Addict
Posts: 924 Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle
Post
by USCode » Thu Apr 15, 2004 5:20 am
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.
Last edited by
USCode on Thu Apr 15, 2004 4:09 pm, edited 1 time in total.
sec
Enthusiast
Posts: 792 Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:
Post
by sec » Thu Apr 15, 2004 4:05 pm
damm, I (& You) Hope linux version will soon release (that mean)
USCode
Addict
Posts: 924 Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle
Post
by USCode » Thu Apr 15, 2004 4:08 pm
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...
Hopefully, that art will include using GTK+2.0.