Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[[ Bug 21570 ]] Tree View Widget - select new elements automatically - #6676

Merged
livecodepanos merged 3 commits into
livecode:developfrom
bwmilby:bwm-21570-treeview
Sep 18, 2018
Merged

[[ Bug 21570 ]] Tree View Widget - select new elements automatically#6676
livecodepanos merged 3 commits into
livecode:developfrom
bwmilby:bwm-21570-treeview

Conversation

@bwmilby

@bwmilby bwmilby commented Sep 7, 2018

Copy link
Copy Markdown
Contributor

The proposed change is the add a new property to the tree view widget hiliteNewElement which when true will cause the widget to automatically highlight the added key. That will yield 2 messaged - dataChanged and hiliteChanged.

The proposed change is the add a new property to the tree view widget `hiliteNewElement` which when true will cause the widget to automatically highlight the added key.  That will yield 2 messaged - `dataChanged` and `hiliteChanged`.
@montegoulding

Copy link
Copy Markdown
Contributor

@bwmilby I'm wondering about ensuring the highlighted node is visible if there is automatic highlighting

@bwmilby

bwmilby commented Sep 11, 2018

Copy link
Copy Markdown
Contributor Author

@bwmilby I'm wondering about ensuring the highlighted node is visible if there is automatic highlighting

If you set the hilitedElement to an node that is not visible, it currently does not scroll into view. If you then scroll the view, it does properly show the highlight. Adjusting the behavior should not be difficult, but I think it should be consistent in both cases.

@montegoulding

Copy link
Copy Markdown
Contributor

Hmm... what about a property to control it. scrollHilitedElementIntoView or something very camel casey like that ;-) It seems to me likely that most people would want it to scroll into view

@bwmilby

bwmilby commented Sep 14, 2018

Copy link
Copy Markdown
Contributor Author

Sounds good. I should be able to have something this weekend.

The tree view widget now has the ability to scroll the selected row into
view. If `true`, this will happen when setting the **arrayData**,
setting the **hilitedElement**, and when adding a new row
(when **hiliteNewElement** is `true`).

One property has been added to achieve this:
* **scrollHilitedElementIntoView**: either `true` or `false`

The default value is `false` to match the behavior of previous versions
of the widget.

When selecting a row that is partially visible, the view will be
adjusted so that the full row is visible.

When changing the **readOnly** property, the view will only change if
the value is being set to `true` and the `Add new element` row is
currently visible.
@bwmilby

bwmilby commented Sep 16, 2018

Copy link
Copy Markdown
Contributor Author

@montegoulding Here's a demo of how the new property impacts the widget.

treeviewtest2

treeviewtest

@montegoulding

Copy link
Copy Markdown
Contributor

This seems great @bwmilby !

@@ -0,0 +1,19 @@
# Properties

The tree view widget now has the ability to scroll the selected row into

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bwmilby I think you should discuss the new property hiliteNewElement here also.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added property to the note.

@montegoulding

Copy link
Copy Markdown
Contributor

@livecode-vulcan review ok b7e4a49

@livecode-vulcan

Copy link
Copy Markdown
Contributor

💙 review by @montegoulding ok b7e4a49

livecode-vulcan added a commit that referenced this pull request Sep 17, 2018
[[ Bug 21570 ]] Tree View Widget - select new elements automatically

The proposed change is the add a new property to the tree view widget `hiliteNewElement` which when true will cause the widget to automatically highlight the added key.  That will yield 2 messaged - `dataChanged` and `hiliteChanged`.
@livecode-vulcan

Copy link
Copy Markdown
Contributor

😞 test failure b7e4a49

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: success
  • try-community-arm64-android-sdk26_ndk16r15: success
  • try-community-x86-android-sdk26_ndk16r15: success
  • try-community-x86_64-android-sdk26_ndk16r15: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.4: success
  • try-community-universal-ios-iphonesimulator11.4: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: failure

@montegoulding

Copy link
Copy Markdown
Contributor

@livecode-vulcan retry b7e4a49

livecode-vulcan added a commit that referenced this pull request Sep 17, 2018
[[ Bug 21570 ]] Tree View Widget - select new elements automatically

The proposed change is the add a new property to the tree view widget `hiliteNewElement` which when true will cause the widget to automatically highlight the added key.  That will yield 2 messaged - `dataChanged` and `hiliteChanged`.
@livecode-vulcan

Copy link
Copy Markdown
Contributor

😎 test success b7e4a49

  • try-community-armv6-android-sdk26_ndk16r15: success
  • try-community-armv7-android-sdk26_ndk16r15: success
  • try-community-arm64-android-sdk26_ndk16r15: success
  • try-community-x86-android-sdk26_ndk16r15: success
  • try-community-x86_64-android-sdk26_ndk16r15: success
  • try-community-js-emscripten-sdk1.35: success
  • try-community-universal-ios-iphoneos11.4: success
  • try-community-universal-ios-iphonesimulator11.4: success
  • try-community-universal-mac-macosx10.9: success
  • try-community-x86-linux-debian8: success
  • try-community-x86_64-linux-debian8: success
  • try-community-x86-win32: success
  • try-community-x86_64-win32: success

@livecodepanos
livecodepanos merged commit e9e0f34 into livecode:develop Sep 18, 2018
@bwmilby
bwmilby deleted the bwm-21570-treeview branch April 27, 2019 23:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants