Hi Mark,
WJ-8003 is also fixed in the latest Wisej release (1.3.35).
Best regards
Frank
Got it! Logged it as WJ-8003. Unfortunately I don’t have an easy workaround.
Ok, I know the problem (difference between SelectionMode “One” and “MultiSimple”).
The problem is that my function to fill the ListBox is in the “Load” event of my form… maybe is the time to draw the selection.
Curiously the “One” work in the Load event, but not “MultiSimple”.
With MultiSimple………
If I put a button for select the item, this works.
If I put a timer for select the item (in the Load event), this works…. (This will be my solution for now).
You can try, also is the same problem in your attached code.
Thanks.
So strange… in your code works!, but in my code only works with the “One” option.
Can you reproduce with the sample I have attached?
I added SelectionMode=SelectionMode.MultiSimple to both the ListView and ListBox in the sample and still works. Maybe it was fixed in the current code base.
I found the problem…
The selection like you say is working only with the “SelectionMode=One”
I’m using the “SelectionMode=MultiSimple” and not working… (visually).
Try it!, maybe is a little bug
Ok, I know the problem.
Maybe something with the theme??
If i ask for the selected items, yes it is selected.. but not visually.
The visual selection works only with the “click”… maybe some bad with my theme?
I’m not sure I understand. From the code you posted looks like you are adding a ListViewItem objects to a ListBox and when you select the item it doesn’t work? Or are you adding the items to a ListView and try to select the in a ListBox? You can’t select an item in the ListBox and expect to see it selected also in the ListView.
I tried a small sample and it all works fine – If I understood what you are trying to do. If you attach a small sample we can make sure we are looking at the same thing.
The example creates 5 ListViewItem instances and adds them to a ListView and to a ListBox. Selecting the index (listiew) or item (listbox) works well. Selecting in one control will *not* affect the other control, which is also correct.
Is an “ListItem”.
But not… the selection dynamically is not working.
I tried everything..
After i add all my items to listview…
I tried
ListBox.SelectedIndex = 52
And nothing…
And ListBox.SelectedItem = vSel (my item object)
and nothing…
What type is lv?
In general, a ListBox accepts anything as an item and item’s properties are not related to the ListBox at all. The only way to select a ListBox item is to use ListBox.SelectedItem or ListBox.SelectedIndex.
Please login first to submit.