On Wed, 09 Oct 2019 16:32:38 GMT, peter pinkness wrote:

Hi all. i'm a very newbie in Gtkd...
I'm looking for replace the actual icon off all the gtkd windows
by a personal icon (like myIcon.ico , myIcon.bmp , myIcon.png) .

someone to help me please ?
(librairies wich must be imported - syntax - little example of script)
Very thanks.

Hi Peter,

Mike's away, so I whipped up a quick demo (which will now, eventually, go on my blog as well). It's not too difficult, just a call to setIconFromFile() as you can see in the TestRigWindow class:

// Description of example

import std.stdio;

import gtk.MainWindow;
import gtk.Main;
import gtk.Box;
import gtk.Widget;

void main(string[] args)
{
	TestRigWindow testRigWindow;
	
	Main.init(args);

	testRigWindow = new TestRigWindow();
	
	Main.run();
	
} // main()


class TestRigWindow : MainWindow
{
	string title = "<Insert Title>";
	AppBox appBox;
	
	this()
	{
		super(title);
		setIconFromFile("images/road_crew.png");
		addOnDestroy(&quitApp);
		
		appBox = new AppBox();
		add(appBox);
		
		showAll();

	} // this()
	
		
	void quitApp(Widget widget)
	{
		string exitMessage = "Bye.";
		
		writeln(exitMessage);
		
		Main.quit();
		
	} // quitApp()

} // class TestRigWindow


class AppBox : Box
{
	bool expand = false, fill = false;
	uint globalPadding = 10, localPadding = 5;
	// add child object and variable definitions here
	
	this()
	{
		super(Orientation.VERTICAL, globalPadding);
		
		// instantiate child objects here
		
		// packStart(<child object>, expand, fill, localPadding); // LEFT justify
		// packEnd(<child object>, expand, fill, localPadding); // RIGHT justify
		
	} // this()

} // class AppBox

And if you're just getting into all this, you might like to check out the blog I mentioned: GtkDcoding.