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

MultiLineTextInput Disable/enable is not working in Cocoa #888

Closed
2 of 14 tasks
ignaciocabeza opened this issue May 2, 2020 · 1 comment
Closed
2 of 14 tasks

MultiLineTextInput Disable/enable is not working in Cocoa #888

ignaciocabeza opened this issue May 2, 2020 · 1 comment
Labels
bug A crash or error in behavior.

Comments

@ignaciocabeza
Copy link
Contributor

ignaciocabeza commented May 2, 2020

Expected Behavior

It should be possible disable/enable MultiLineTextInput in Cocoa.

Current Behavior

Enable/Disable feature in MultiLineTextInput is not working. (ref: https://github.com/beeware/toga/blob/master/examples/multilinetextinput/multilinetextinput/app.py#L9)

Additional Info

In this widget self.native is a NSScrollView. set_enabled is updating self.native.enabled but text widget lives in self.text
(https://github.com/beeware/toga/blob/master/src/cocoa/toga_cocoa/widgets/multilinetextinput.py#L20-L30)

Also, self.text does not have enabled property. I found only editable and selectable. Maybe a enabled property should set this two properties?. The only this that I can't reproduce is show a "gray disabled apparence" when enabled == false
Example code:

    def set_enabled(self, enabled):
        self.interface.readonly = not enabled
        self.text.selectable = enabled

Steps to reproduce

Run https://github.com/beeware/toga/blob/master/examples/multilinetextinput/multilinetextinput/app.py and press toggle enabled

Your Environment

  • Python Version (list the specific version number)
    3.7

  • Operating System and Version (select from the following and list the specific version number; if your OS is not listed, list that as well)

    • macOS - version:
    • Linux - distro: - version:
    • Windows - version:
    • Other - name: - version:
  • Toga Version (list the specific version number or git hash)
    0.3.0.dev20

  • Toga Target (the type of app you are trying to generate)

    • android
    • cocoa
    • django
    • gtk
    • iOS
    • tvOS
    • watchOS
    • winforms
    • win32
    • Other (please specify)
@freakboy3742 freakboy3742 added bug A crash or error in behavior. up-for-grabs labels May 3, 2020
@freakboy3742
Copy link
Member

Fixed by #1938.

@mhsmith mhsmith closed this as completed Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
Development

No branches or pull requests

3 participants