Windows Text Viewer in D

Dejan Lekic dejan.lekic at gmail.com
Thu Apr 9 17:13:07 UTC 2026


On Thursday, 9 April 2026 at 01:27:47 UTC, Paul wrote:
> I have tried various approachs to create what is listed in the 
> subject line - Windows-based text viewer.  I've tried Visual-D, 
> VSCode, DMD, LDC, Dlangui, arsd, GtkD, DMD, LDC, and ...of 
> course AI.  I'm embarrassed to say that I've yet to get a 
> window to open and show a text file.  Could someone point me to 
> a simple solution to start with?

It would help if you explain what you want to do - if you want to 
"just" edit text, then you can start with this simple example: 
https://codeberg.org/dejan/gid-examples/src/branch/main/gtksource5

Just copy the dub.sdl and src/app.d to your new project (new 
directory). And you are good to go. Run `dub build` or `dub run` 
and it will create text editor for you. If you want to build an 
IDE, then I suggest you look at my DIDE project - 
https://codeberg.org/dejan/dide . Feel free to use any part of 
it, it is opensource, right...

If for some reason you do not want to use GTK's SourceView 
library, you still can still use GTK's TextView and have a 
powerful text editing capabilities, _including styling_.

If you wish to discuss this further, come to the giD discord 
server and we will try to help you...


More information about the Digitalmars-d-learn mailing list