question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Label option for boolean parameters has no effect

See original GitHub issue

Describe the bug When setting a custom label attribute for a boolean parameter in a magicgui decorated function, the label of the object in the GUI doesn’t update accordingly.

To Reproduce

from magicgui import magicgui

@magicgui(check={'label': 'ABC'})
def test(check: bool):
    pass


if __name__ == '__main__':
    test.show(run=True)  # the label is 'check', not 'ABC'.

Expected behavior The shown label should be ‘ABC’.

Environment (please complete the following information):

  • OS: Linux
  • backend: Qt
  • magicgui version: 0.2.6

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
haesleinhuepfcommented, Apr 5, 2021

text is the thing to the right of the checkbox (or, on a button, on the button itself). label is the thing to the left of a widget

Ahh, now I get it 😃 Thanks for the explanation.

1reaction
tlambert03commented, Apr 5, 2021

Ohhh sorry, that will only work during instantiation. Yeah, technically “text” is just the correct thing to use here, not label. “Label” is reserved to mean when there is an additional widget that labels the primary widget. But ButtonWidgets have their own text IN the widget. I see that that is a bit confusing, but it’s two separate bits of text… will think about how to clarify

Read more comments on GitHub >

github_iconTop Results From Across the Web

Label for boolean entry fields moved to the right ?
it seems in the parameters for a job, the labels (==variable names) for Boolean entry fields moved from the left to the right....
Read more >
Is it wrong to use a boolean parameter to determine behavior?
So I would never label a choice of parameter to be "wrong" in and of itself -- and certainly not something as generic...
Read more >
Boolean parameter with values as "YES" or "NO" in reports
Under Available values, choose Non-Queried and in the label field type "Yes" and make the value True then on the next line make...
Read more >
Changing a boolean parameter at build time has no effect on ...
It appears that changing this boolean at runtime, via the Jenkins UI, has no effect on whether or not the stage gets run....
Read more >
SQL Boolean Not Recognized - Power Platform Community
Solved: Hello, Scenario: SQL Data Source with Boolean data type in one column Gallery displaying SQL table data Using an IF statement to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found