Skip to main content
Disposition_Dev
Legend
August 17, 2017
Answered

ScriptUI Highlight Items in Listbox

  • August 17, 2017
  • 1 reply
  • 597 views

Hey fellow scripters!

I'm building a detailed ScriptUI dialog to help keep track of rush orders through our system. The basic premise is that a JSON database file will be populated by a separate script that logs the information about a given order. The UI dialog will then read the database file and display each of the rush orders currently in the system in a listbox, then when an order is clicked/selected in the listbox, a display panel below is updated to display the info about that particular order (due date, whether it's in progress, whether the order has been sent to the customer for approval, etc). (see the attached screenshot).

Imgur: The most awesome images on the Internet

My question for all of you is how i might go about highlighting certain items of the listbox, for example, if i determine that one of them is due within 4 hours, i'd like to highlight it red or something to indicate at a glance that this order is a priority.

I can't seem to put my finger on how to target a single listItem and change it's background color property. Any thoughts on the matter?

Thanks, folks.

This topic has been closed for replies.
Correct answer Silly-V

That looks cool!

I think what you can do is use an image in your listbox items. When refreshed, you can remove all the items then add them back in, this time with different images - if it turns out that simply switching an image without removing the items doesn't work.

1 reply

Silly-V
Silly-VCorrect answer
Legend
August 17, 2017

That looks cool!

I think what you can do is use an image in your listbox items. When refreshed, you can remove all the items then add them back in, this time with different images - if it turns out that simply switching an image without removing the items doesn't work.