go-sciter icon indicating copy to clipboard operation
go-sciter copied to clipboard

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

Open cocotyty opened this issue 10 years ago • 6 comments

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?

cocotyty avatar Nov 16 '15 02:11 cocotyty

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:

oskca avatar Nov 16 '15 05:11 oskca

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

cocotyty avatar Nov 16 '15 05:11 cocotyty

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

oskca avatar Nov 16 '15 05:11 oskca

Still can be resized T_T

cocotyty avatar Nov 16 '15 05:11 cocotyty

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

oskca avatar Nov 16 '15 10:11 oskca

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

cocotyty avatar Nov 17 '15 15:11 cocotyty