wanting to try a GUI toolkit: needing some advice on which one to choose

Vinod K Chandran kcvinu82 at gmail.com
Fri May 28 17:04:15 UTC 2021


On Thursday, 27 May 2021 at 01:17:44 UTC, someone wrote:
>
I am learning D by writing a Windows only GUI library. It is 
taking too much time for me since, I am writing some stuff and 
then happen to learn some new things about it and re-writing 
it.Anyhow, so far so good. This is the code now.

```d
import winglib ;
import std.stdio : log = writeln;

void main() { 	

	auto frm = new Window() ;	
	frm.text = "Learning D By Writing D";

         // C = Control class. Window is derived from Control
         // E = EventArgs.

	frm.onMouseHover = (c, e) => log("Mouse is now on ", e.x, ", ", 
e.y);
	frm.onMouseLeave = (c, e) => log("Mouse leaved from window") ;	
	frm.onKeyDown =  (c, e) => log(e.keyCode, " key is pressed");
	frm.create() ;

	auto btn = new Button(frm) ;
	btn.font.name = "Calibri" ;
         btn.width = 150 ;
	btn.text = "DMD Or LDC" ;
	btn.font.size = 14 ;
	btn.create() ;

	frm.show() ;	
	
}
```
I am slowly adding more features to this. Till now, Window & 
Button are completed.






More information about the Digitalmars-d-learn mailing list