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

setGeometry documentation error #425

Closed
vinokumark opened this Issue Mar 26, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@vinokumark

vinokumark commented Mar 26, 2018

Unknown function: Check your spelling, do you need more camelCase?

@ChaosCreaterx

This comment has been minimized.

ChaosCreaterx commented Mar 26, 2018

I got exactly the same error, I hope we'll find a solution ..

Unknown function: Check your spelling, do you need more camelCase?

@vinokumark

This comment has been minimized.

vinokumark commented Mar 26, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Mar 27, 2018

Sorry about this, it's not a bug in the code, but a bug in the documentation.

.setGeometry() has been replaced by two functions:
.setLocation() and .setSize()

This must have got missed when the docs were updated.

These new functions also exist in the new properties section as well.

So, you can call:

app.setSize("200x200")
app.size = (200,200)
app.size = "200x200"

@jarvisteach jarvisteach added this to the 1.0 milestone Mar 27, 2018

@jarvisteach jarvisteach changed the title from setGeometry error to setGeometry documentation error Mar 27, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Mar 27, 2018

I found this reference in the following docs:

./pythonContextManager.md:68:    app.setGeometry(250, 300)
./pythonGuiOptions.md:30:* `.setGeometry(geom)` & `.setGeometry(width, height)`  
./pythonGuiOptions.md:32:    * Either as a single String `.setGeometry("200x100")` (widthxheight)  
./pythonGuiOptions.md:33:    * As two separate parameters `.setGeometry(200,100)`
./pythonGuiOptions.md:34:    * Or to go *Fullscreen* `.setGeometry("Fullscreen")`  
./pythonGuiOptions.md:46:    app.setGeometry("fullscreen")
./pythonSubWindows.md:106:app.setGeometry("400x400")
./pythonWidgetGrouping.md:467:app.setGeometry(280,400)
@vinokumark

This comment has been minimized.

vinokumark commented Mar 27, 2018

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Mar 27, 2018

So, you need to create the subWindow then show it.

app.startSubWindow("PopUp")
app.addLabel("SubWindow")
app.stopSubWindow()

app.showSubWindow("PopUp")

I recommend creating the subWindow before calling .go(), and then having a function to show it.

In the code above, you;re missing the call to show it.

jarvisteach added a commit that referenced this issue Mar 27, 2018

jarvisteach added a commit that referenced this issue Mar 29, 2018

@vinokumark

This comment has been minimized.

vinokumark commented Apr 9, 2018

Need some example. when click Addbutton function create multiple textentry box.

@jarvisteach

This comment has been minimized.

Owner

jarvisteach commented Apr 9, 2018

Try this:

from appJar import gui 

count = 0 
def press():
    global count
    app.entry("NEW" + str(count))
    count += 1

with gui() as app:
    app.label('hello world')
    app.button("ADD ENTRY", press)

jarvisteach added a commit that referenced this issue Apr 9, 2018

@jarvisteach jarvisteach closed this Apr 9, 2018

jarvisteach added a commit that referenced this issue Apr 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment