Highlight searched text of label

when i seach any text it should be highlight or colour should be change
now i used this


it worked if i searched and pick element but if i click next or previous button then subsection label not change
and so that i did not get next text

Hi dear,

you should explain better how your app works and what you are trying to achieve, maybe also showing the code in the buttons you mentioned.

it’s difficult to imagine how it’s supposed to work if you don’t explain it clearly, I also think it can be done much more simply, but you need to give me more details

If I search some text then search list view appear and if click on particular item then label open, and next and previous button appear. If I click on next the text in label will be from next searched item.
In this if I click on search list item then the searched text in label colour changed.
Now if I click on next the next text will appear in Chapter, section label but not appeared in subsection label, this is problem

I’m really struggling to understand, try recording your screen and posting it here, thanks.

Hey @RaYzZz I asked chatgpt for assistance for easy understanding maybe it’s correct

Yes. The author is describing a UI flow and data-binding problem in a search-driven reader interface (likely in Kodular / App Inventor–style blocks). Below is a structured interpretation of what he is trying to build and where the issue occurs.


What he is trying to build (intended behavior)

1. Search and results

  • The user enters search text.
  • A Search ListView appears showing all matching items (for example: chapters / sections / subsections that contain the search term).

2. Selecting a search result

  • When the user clicks a specific item in the search ListView:
    • A Label opens showing the full text/content of that item.
    • Next and Previous buttons become visible.
    • The searched word inside the Label is highlighted (text color changes).

3. Navigation (Next / Previous)

  • When the user clicks Next:
    • The Label should update to show the next item from the search results, not from the full list.
    • Chapter, Section, and Subsection labels should all update accordingly.

What is going wrong (the problem)

  • When Next is clicked:
    • The Chapter and Section labels update correctly.
    • The Subsection label does NOT update.
  • This happens only after navigation (Next/Previous), not when the user initially clicks the search result.

What this implies technically

This strongly suggests:

  1. Search click logic is correct
  • Subsection label is set correctly when an item is clicked in the search ListView.
  1. Next / Previous logic is incomplete or inconsistent
  • The Next button logic updates:
    • Chapter
    • Section
  • But does not update Subsection, or:
    • Uses the wrong list/index for Subsection
    • Or uses the full data list instead of the filtered search list

Most likely root causes

1. Index mismatch

  • currentIndex is updated for Chapter/Section
  • Subsection is still using:
    • Old index
    • Or original (unfiltered) list

2. Separate lists not kept in sync

For example:

  • SearchResults_Chapters
  • SearchResults_Sections
  • SearchResults_Subsections

When clicking Next, only two lists are accessed, not the third.

3. Subsection is set only on ListView.Click

  • Subsection label is updated only inside:
    • when SearchListView.AfterPicking
  • But not inside:
    • when NextButton.Click

What he is actually asking for help with

In simple terms:

“How do I make the Subsection label also change correctly when using Next/Previous navigation after selecting a search result?”


One-sentence summary

He is trying to build a searchable reader with next/previous navigation, but his Next button logic does not update the Subsection label from the filtered search results, even though Chapter and Section do.


If you want, I can:

  • Translate this into Kodular block logic
  • Show the correct data structure
  • Or explain how to synchronize indexes for search navigation

Just tell me which one you need.

2 Likes

Much better indeed :grin:,

but since the initial explanation wasn’t well defined, I’m afraid the AI may have imagined what it thinks is wanted, and I’m not sure it actually matches what Sagar wants.
If they also had an image or a video showing what he means, it would be much better, also because I believe that

Thanks anyway for the help :heart_hands:

1 Like