sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

Can you help me? I want to resize the window. #7

Open cocotyty opened 8 years ago

cocotyty commented 8 years ago

Hi. I am using sciter to make a client for my project and I want a fixed size window. is there any function that can help to do this?

oskca commented 8 years ago

You can try this: first create a window of the prefered size

    rect := sciter.NewRect(0, 0, width, height)
    // create window
    w, err := window.New(sciter.DefaultWindowCreaetFlag, rect)
    if err != nil {
        log.Fatal(err)
    }

then set view.isResizeable = false in the page script of your html file

<script type="text/tiscript">
      self.ready = function(){
            view.isResizeable = false
      }
</script>

BTW the sciter[64].exe in the sciter-sdk can be used to browser the local copy of the sciter documentation which is a good help for writing sciter script or the tiscript :smile:

cocotyty commented 8 years ago

Thank you! very useful ,but window still can be resized. ^_^

oskca commented 8 years ago

Would it be that the window can still be maximized but not resized ?

cocotyty commented 8 years ago

Still can be resized T_T

oskca commented 8 years ago

Well, It's weird. What's your platform? I've test on win8.1/amd64 and it works

Can you try this example: https://github.com/oskca/sciter/tree/master/examples/fixed

cocotyty commented 8 years ago

On Linux Deepin/amd64. ^_^. Thank you for this good golang gui lib.