Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Best way to make popup dialogs? #51

Open
alanbaumgartner opened this issue Mar 19, 2018 · 2 comments
Open

Best way to make popup dialogs? #51

alanbaumgartner opened this issue Mar 19, 2018 · 2 comments

Comments

@alanbaumgartner
Copy link

alanbaumgartner commented Mar 19, 2018

Hello!

I am fairly unfamiliar with wx in general and have looked around a decent bit but I am currently have my main application as a wx.Frame and I want to have a popup window where I can edit the settings.

Is the best or most accepted way to do this a wx.Dialog? If so, how should I structure it?

This is what I am currently using and it doesn't feel correct.

type Client struct {
	wx.Frame
	statusbar wx.StatusBar
	menubar   wx.MenuBar
	listenBtn    wx.Button
	saveDialog SaveDialog
}

type SaveDialog struct {
	wx.Dialog
	hostCtrl wx.TextCtrl
	portCtrl wx.TextCtrl
	saveBtn wx.Button
	loadBtn wx.Button
}

From the save dialog I take the hostCtrl and portCtrl's text fields and save/load them with a JSON file.

@alanbaumgartner alanbaumgartner changed the title Best way to have popup dialogs? Best way to make popup dialogs? Mar 19, 2018
@alanbaumgartner
Copy link
Author

I have found popup menus after reading most of wx documention. Is there anything like godocs for wxGo I could read too?

I will leave this open so you can see my second question but can be closed whenever!

Thanks.

@dontpanic92
Copy link
Owner

To be honest - No. Documentation is definitely a shortage of wxGo. But fortunately, wxGo is no more than a wrapper, so in most cases you can find the answer through reading wxWidgets' doc, having a check on the examples, etc. If you have any questions, welcome to open an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants