Search found 66 matches

by dougmo52usr
Fri Aug 22, 2025 2:25 pm
Forum: Coding Questions
Topic: XMLNodeFromPath fails when XMLNodePath inserts []'s
Replies: 0
Views: 408

XMLNodeFromPath fails when XMLNodePath inserts []'s

I'm parsing a glade xml file. XMLNodeFromPath can't seem to handle XMLNodePath output when path has been abbreviated using "[]'s".

GtkButton @ /interface/object/child/object/child/object/child/object
GtkButton @ /interface/object/child/object/child/object/child/object

GtkToggleButton @ /interface ...
by dougmo52usr
Thu Aug 21, 2025 2:25 am
Forum: Coding Questions
Topic: linux glib g_node_append_data_ compile error
Replies: 4
Views: 283

Re: linux glib g_node_append_data_ compile error

Thanks for the help. I used your Macro g_node_append_data(parent, daten) example which works fine. However, I have a few questions.

I can use ImportC "/usr/lib/x86_64-linux-gnu/libglib-2.0.so", but ImportC "" doesn't compile on mine. Is there a project setting I need to use to specify location of ...
by dougmo52usr
Wed Aug 20, 2025 2:39 pm
Forum: Coding Questions
Topic: linux glib g_node_append_data_ compile error
Replies: 4
Views: 283

linux glib g_node_append_data_ compile error

The auto complete dropdown shows g_node_append_data_, and hitting tab inserts it in code, but the compiler fails saying g_node_append_data_ is not a function, array, list, map, or macro. g_node_new_ works. What am I missing to get access to glib functions code completion displays as present?
by dougmo52usr
Thu Aug 14, 2025 1:29 am
Forum: Bugs - Linux
Topic: [Done] #PB_Frame_Container disappears in Forms
Replies: 2
Views: 512

[Done] #PB_Frame_Container disappears in Forms

In PureBasic 6.20 (Linux - x64), there is no option in FrameGadget for #PB_Frame_Container in the Form tool. The FrameGadget help topic has an example, which may work in a pb file, but it can't be reproduced in the Form tool. It just deletes CloseGadgetList() and #PB_Frame_Container.
by dougmo52usr
Tue Aug 12, 2025 1:57 am
Forum: Tricks 'n' Tips
Topic: Sample console app script to create a GUI from Glade
Replies: 0
Views: 442

Sample console app script to create a GUI from Glade

A console app that parses a glade file and generates a boiler plate pb file for experimenting with gtk and glade. Run it in a console as:

./GladeGUI.bin ./Part1.glade > Glade.pb


; A console app that parses a glade XML file and generates
; a boiler plate PureBasic file that can be used to test ...
by dougmo52usr
Fri Jul 26, 2024 4:19 pm
Forum: Coding Questions
Topic: Dialog titlebar font
Replies: 2
Views: 815

Re: Dialog titlebar font

For my Linux distribution, I am satisfied to use "Control Center/Look and Feel/Appearance" menu item "Fonts" to select appropriate font size. In this tab I can set fonts for "Application", Document", Desktop", Window title" and "Fixed width". Although it changes fonts for other apps, I am writing ...
by dougmo52usr
Fri Jul 26, 2024 2:09 am
Forum: Coding Questions
Topic: Dialog titlebar font
Replies: 2
Views: 815

Dialog titlebar font

LoadFont changes the font on dialog gadgets, but the titlebar font stays the same. How do I change the titlebar font for a dialogwindow?

PureBasic 6.11 LTS (Linux - x64)
Feel the ..Pure.. Power
by dougmo52usr
Wed Jul 24, 2024 8:36 pm
Forum: Coding Questions
Topic: Get Image from ImageID
Replies: 5
Views: 1064

Re: Get Image from ImageID

If I pass an image to a ButtonImageGadget by ImageID, then immediately free the image, the button still shows the image. For that reason, I felt that the button copied the image, and it seemed to be wasteful of memory to keep an image the button has copied. But if there is no way to request the ...
by dougmo52usr
Wed Jul 24, 2024 4:45 pm
Forum: Coding Questions
Topic: Get Image from ImageID
Replies: 5
Views: 1064

Get Image from ImageID

I did a Google search for "#Image from ImageID", and found a link to a forum question. The response to the question on the google link was Hi Julian. Until the team implements the long-lamented GetImageNumber (fromImageID) function, here's a simple drop-in solution that might work for you. It's ...
by dougmo52usr
Thu Jul 04, 2024 4:10 pm
Forum: Linux
Topic: CreateXMLDialog questions
Replies: 1
Views: 2059

Re: CreateXMLDialog questions

4. I noticed that ResizeWindow(DialogWindow(dialog),DesktopMouseX(),DesktopMouseY(),#PB_Ignore,#PB_Ignore) puts the dialog where I clicked the mouse.
by dougmo52usr
Thu Jul 04, 2024 3:53 pm
Forum: Linux
Topic: CreateXMLDialog questions
Replies: 1
Views: 2059

CreateXMLDialog questions

PureBasic 6.11 LTS (Linux - x64)

1. Is there any way to specify a ParentID without also specifying x, y, width, height?
2. If I specify a ParentID, the dialog seems to be centered in the parent, ignoring the values of x, y, width, height. Is that typical?
3. If I skip optional parameters, is there ...
by dougmo52usr
Mon Feb 05, 2024 12:52 am
Forum: Coding Questions
Topic: Map access questions
Replies: 3
Views: 619

Re: Map access questions

Your method certainly works. I was hoping that I could avoid passing a map in a structure by creating a map reference.

In DoSomething1, Global MapA is altered through a reference. In DoSomething2, Global MapA is altered directly. In the Procedures, MapA syntax looks exactly the same.

Is there a ...
by dougmo52usr
Sat Feb 03, 2024 7:19 pm
Forum: Coding Questions
Topic: Map access questions
Replies: 3
Views: 619

Map access questions

I see in the help, that I can pass a Map ByRef like Procedure DebugMap(Map ParameterMap.s()).

Suppose I rather need to pick a map within a function at runtime. The code below which obviously fails compile, gives an idea of what I want to accomplish. Is there a way to create a local variable and ...
by dougmo52usr
Tue Jan 23, 2024 3:15 am
Forum: Coding Questions
Topic: Mouse position in a gadget coordinates?
Replies: 3
Views: 569

Re: Mouse position in a gadget coordinates?

Thanks for the quick response. That would work if the gadget was on the main window. Once I start putting containers inside containers things get tricky.

The Form Designer has an option to reparent gadgets which means their x and y are no longer relative to the main window, but their to new parent ...
by dougmo52usr
Tue Jan 23, 2024 2:18 am
Forum: Coding Questions
Topic: Mouse position in a gadget coordinates?
Replies: 3
Views: 569

Mouse position in a gadget coordinates?

I have a window with a PanelGadget that contains another PanelGadget as a child. When I call OpenGadgetList on one of the child panel tabs, the top left corner seems to be at 0,0. However, WindowMouseX, WindowMouseY return coordinates based on the main window independent of the gadget below the ...