asticode / go-astilectron-demo

Discover the power of Astilectron through a demo app
MIT License
404 stars 83 forks source link

How can I open the dev tools? #72

Open linclt opened 2 years ago

linclt commented 2 years ago

here is my code, but it can`t open the dev tools:

image

asticode commented 2 years ago

I don't think using this option works, instead you need to use these functions directly

linclt commented 2 years ago

I don't think using this option works, instead you need to use these functions directly

Thank you very much for your help. but when I use go-astilectron-demo,I don`t Create a new window as this: var w, _ = a.NewWindow("http://127.0.0.1:4000", &astilectron.WindowOptions{ Center: astikit.BoolPtr(true), Height: astikit.IntPtr(600), Width: astikit.IntPtr(600), }) w.Create()

I don`t know how can I get the w

asticode commented 2 years ago

You can retrieve the window using the OnWait attribute

linclt commented 2 years ago

You can retrieve the window using the OnWait attribute

thanks ! If I want to get the w in the process of using the program,what should i do? for example, I want to set a button to controll the open and close of the dev tool

linclt commented 2 years ago

You can retrieve the window using the OnWait attribute

also, I dont`t know how to get the w when I use go-astilectron-demo to achieve this

// Play with the window w.Resize(200, 200) time.Sleep(time.Second) w.Maximize()

asticode commented 2 years ago

You can retrieve the window using the OnWait attribute

thanks ! If I want to get the w in the process of using the program,what should i do? for example, I want to set a button to controll the open and close of the dev tool

The window is stored in a global variable, that way you can use it anywhere in your program

linclt commented 2 years ago

You can retrieve the window using the OnWait attribute

thanks ! If I want to get the w in the process of using the program,what should i do? for example, I want to set a button to controll the open and close of the dev tool

The window is stored in a global variable, that way you can use it anywhere in your program

thanks, a lot! You don't know how much I appreciate your help! In addition, may I know your email address or discord? My email is hirosiyamada81@gmail.com My discord is hirosiyamada#7860