I’m fairly new to blueprints and am stuck. I have created a dynamic search bar based off this tutorial: Unreal Engine Mechanics | Search Bar - YouTube
It basically allows you to type into a search bar and have the scroll box show or not show results based on the text in the bar.
Everything worked perfectly, until I started adding buttons to my text. Now when I search in the search bar, the text that has a button wrapped around it does not show up in the scroll bar at all. I have a feeling it has something to do with the get child at or get children count, but am not sure how to rectify. The goal is to type into the search bar, have it narrow down options based on text, and be able to select that option using a button.
I have attached screens of this - in this example the button is only wrapped around the prep plant text:
The search can’t reach the text because of the button, you need to go another child in because you added it as a parent to the text. My suggestion is to be more professional and create a new widget with button text and all the things you want(that way if you want to do any changes you just do them there and nothing will break) then just add it to the box as you did to the whole text do a cast after the for loop for children and get the text from it.
Not the search bar or the scroll box the TextBlock, again what you did is place a Button as a parent of the TextBlock so when you searching through the ScrollBox for children what you get is a Button and few TextBlocks. What I suggest is create a new widget that already has a Button a TextBlock and everything you need, remove all the TextBlocks that you have to add the new widgets instead and do a cast after the loop for the get child at.