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

Update individual values on ListBox #173

Closed
nbness2 opened this Issue May 30, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@nbness2

nbness2 commented May 30, 2017

The most comparable function in another widget is
setOptionBox(title, position, value=True, callFunction=True)
I think that adding this functionality to ListBox would be beneficial to people who use large lists so that they don't have to update with big delay every time they want to change something in the list.
setListItem(title, item, value)

@nbness2

This comment has been minimized.

Show comment
Hide comment
@nbness2

nbness2 May 30, 2017

The current workaround is to do this instantly

self.getListBoxWidget(listbox_title).delete(current_)
self.getListBoxWidget(listbox_title).insert(idx, new_value)

I suggest this because some people using appjar (beginners to making gui) would not think to change tkinter stuff, or may not even know what tkinter is.

nbness2 commented May 30, 2017

The current workaround is to do this instantly

self.getListBoxWidget(listbox_title).delete(current_)
self.getListBoxWidget(listbox_title).insert(idx, new_value)

I suggest this because some people using appjar (beginners to making gui) would not think to change tkinter stuff, or may not even know what tkinter is.

@jarvisteach jarvisteach added this to the 0.07 milestone May 30, 2017

@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach May 30, 2017

Owner

There are already features to set the background/foreground colours of individual items in a list based on their value or position, so it shouldn't be much work to change the value of those same items.

Will add to the next release.

Owner

jarvisteach commented May 30, 2017

There are already features to set the background/foreground colours of individual items in a list based on their value or position, so it shouldn't be much work to change the value of those same items.

Will add to the next release.

jarvisteach added a commit that referenced this issue Jun 2, 2017

setListItem (#173)
New functions for changing a list items:
* `.setListItem()`
* `.setListItemAtPos()`

Introduced new helper function: `__getListPositions()` to convert a
list of items to a list if positions.

Refactored other functions to use helper function.

`addListItem()` can now take a position to insert at.

Tidied up other functions - naming more consistent, deprecated messages.
@jarvisteach

This comment has been minimized.

Show comment
Hide comment
@jarvisteach

jarvisteach Jun 2, 2017

Owner

New functions:

  • .setListItem(title, oldVal, newVal)
  • .setListItemAtPos(title, pos, newVal)

In next release.

Owner

jarvisteach commented Jun 2, 2017

New functions:

  • .setListItem(title, oldVal, newVal)
  • .setListItemAtPos(title, pos, newVal)

In next release.

@jarvisteach jarvisteach closed this Jun 2, 2017

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