/go-sciter-example

Sciter examples for golang in increasing complexity order. Aim is to provide good learning resource by examples.

Primary LanguageGo

About Repository

Creating gui application with golang something nightmare before sometime[ until i found sciter sdk wrapper for Golang] for me. There is very less amount of resource available for go-sciter. So I am sharing this examples to give some contribution to create resource.

About Programs

No one is perfect in this world, so how one can create perfect things. Program written by me may be written in some another[ far better ] way. If you found something like that please make a pull request. I will be happy to review and merge it. I have explained almost all program listed below on my blog link to my blog

List of programs

Hello world equivilate program for sciter. Just to get you excited by showing window on screen.

02-HelloTIScript

TIScript is extended version of JavaScript. This program contains small portion of TIScript to introduce TIScript.

03-TIScriptInput

Moving one step forward in TIScript. This program shows how to access data from html inputs using TIScript.

Once you get input from HTML elements you may need to call a goLang function and process input. This program is simplest example of taking input from html via TIScript passing that data to goLang function and updating output on HTML element.

Summation of the journey until. It's a very simple calc which uses every thing we learn in earlier examples.

It's not good if you have to load external html file. As you have to care about location of html file. But instead what if html is inside your gocode? . It's cool right!. This is examples is about how to embedded html in your go code.

Time to explore something new. This example contains code for extremely simple notepad. It just allows you to open file, write a new file , save it and exit the appliaction. But, Its a good example for those who want to make an application has to work with documents, right! of course.

If you have gone through 06, it actully puts html/css code in go file. Which looks weird. Sciter-sdk comes with one utility called packfolder which can generate single archive for your resource folder in one of the supported output format. So, now there is no need to write your gui inside go code. You can use packfolder to use that code.

If you are confused what i am talking about, please see the code, it might make you more clear.

09-image-viewer

Image-viewer support png/jpg file to view. It autoloads every jpg/png file behind the scene and displays on screen existing in the same folder as executable.Its image loading logic is written in golang while front-end is sciter. UI may be create even better, but as this is just for example. Image of Image-Viewer

10-screen-sefli

Screen-sefli takes snapshot of screen according to provided cordinates. Image of Screen-selfi

11-custome-layout

12-Sciter-glassy-background

Sciter now supports glassy backgroun as well. You can give a modern glassy UI look to your appliaction.

13-Sciter-window-frame-extended

You can customize titlebar. window-frame='exteded' removes title bar and puts windows controls in appliction body. Image

14-Add-button-with-onclick-event-binding-from-golang

You can add any element with your desired attirubtes and event handing from golang side. How!, see this example.

15-Create-new-window-on-button-click

It may happened that your application need multiple window to carry out certain task, for example to take profile pic you need a separate window with access to webcam that can take pic and the pass data to main window are application itself. Here is simple example of how you can create/open new window with button click

16-Add-menu-in-menubar-mac-os-x

You can add menu in menubar of mac-os-x. Not using sciter or golang{direclty}. But Cgo comes at rescaue here. You can add menu using objective-c code using Cocoa framework at cgo.


Youtube playlists

Video tutorials on go-sciter for beginners