• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ScriptUI Highlight Items in Listbox

Community Expert ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

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.

TOPICS
Scripting

Views

499

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Aug 17, 2017 Aug 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.

Votes

Translate

Translate
Adobe
Valorous Hero ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines