02-15-2023 10:13 AM
@TylerHW wrote:
Also, i want to keep the scroll bar incase they add more elements than i have rows and the listbox will stay the same size
You can have the scrollbar always visible. It does not depend on the number of actual items.
02-15-2023 10:17 AM
Lol, i was going to say the same.
Thanks for you response earlier, I had a look at the caller and it was initialising a load of unwanted cells xD
I've changed it now and it seems to be working 🙂
02-15-2023 10:19 AM
02-15-2023 10:23 AM - edited 02-15-2023 10:25 AM
@TylerHW wrote:
I've changed it now and it seems to be working 🙂
You still have a 2D string array constant with at least one element. I would recommend to start with an empty array instead.
(right-click array container ... data operations... empty array)
Of course you don't really need that code at all if the subVI would write the playlist from scratch instead of appending. Hard to give advice without seeing all code.
02-15-2023 10:27 AM
No worries, it's working how I need it to now so that's all that matters, it's for a uni exam so I just need it to work xD
02-15-2023 12:20 PM
Thought it was fine, nevermind.. I seem to be having an issue where I'm now not initialising enough cells for data to go into. However if I initialise too many I'll have blank spaces, and while the data is in memory it won't actually get displayed on the listbox as there isn't enough ItemNames initialised in the array. Any help?
02-15-2023 12:38 PM - edited 02-15-2023 12:46 PM
This is cool. I remembered working on the project where I had to log data on the table and I was struggling with removing empty cells. Thanks Mr. Altenbach for sharing.
Mr @altenbach, I don't think this helps remove empty cells.
02-15-2023 01:03 PM - edited 02-15-2023 01:09 PM
@GRCK5000 wrote:Mr @altenbach, I don't think this helps remove empty cells.
you cannot remove empty single cells in a 2D array because all rows need to be the same size. You can easily change the logic to only retain rows that don't have any empty string element at all.
02-15-2023 01:11 PM
@TylerHW wrote:
Thought it was fine, nevermind.. I seem to be having an issue where I'm now not initialising enough cells for data to go into. However if I initialise too many I'll have blank spaces, and while the data is in memory it won't actually get displayed on the listbox as there isn't enough ItemNames initialised in the array. Any help?
If you correctly build your array of items, there is no need to initialize anything. If you would show us a simplified version of how you do it, we can show you the correct way. Where does the data come from?
02-15-2023 01:24 PM
So the data is coming from xml files containing clusters, i'm using the info inside these files to populate the lists. But these lists need to be pre-initialised in order for me to parse the contents of the files into the the ItemNames cell. It would take far too long for me to explain the whole architecture.
If you wanted, if you have something like discord or some other means of communication it would probably be easier for me to show you my requirements and we could discuss them over messages