A few words about me: I am new to PureBasic and GTK and even to programming. So you may call me a newbie.
After searching documentation of PureBasic and GTK, through the forums without being able to solve my little problem, I decided to post it here. I hope this is the right spot and somebody will be nice enough to help me out. Said this, here it is:
Code: Select all
GtkTextBuffer *buffer
color.GdkColor
start.GtkTextIter
ende.GtkTextIter
If OpenWindow(0, 100, 200, 600, 200, "Test", #PB_Window_ScreenCentered)
CreateStatusBar(0, WindowID(0))
AddStatusBarField(#PB_Ignore)
StatusBarText(0, 0, "Test", 0)
EditorGadget(14, 10, 10, 580, 100)
SetGadgetColor(14, #PB_Gadget_BackColor, RGB(255, 255, 210))
AddGadgetItem(14, -1, "This is just an example and it works, as in my code it does as well.")
AddGadgetItem(14, -1, "But when compiling, I get an annoying warning!")
AddGadgetItem(14, -1, "Line 20, Glib-GObject: A_g_object_set_valist: object class 'GtkTextTag' has no property named ...")
EndIf
buffer = gtk_text_view_get_buffer_(GadgetID(14))
tag = gtk_text_buffer_create_tag_(buffer, "mytag", "background", "darkred")
gtk_text_buffer_get_iter_at_offset_(buffer, @start, 8)
gtk_text_buffer_get_iter_at_offset_(buffer, @ende, 12)
gtk_text_buffer_apply_tag_by_name_(buffer, "mytag", @start, @ende)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
End
The code runs fine
Thanks a lot
