Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
460
Prevent first Item in list from becoming active
posted

Hi,

I've created a listbox component which inherits from UltraListView (set with listbox properties).

In my class I've overrided many events such as ItemSelectionChanging, ItemCheckStateChanging etc.. in order to achieve my goals.

However I have a problem, and let's take this simple example: when a new Item is active, which means I've clicked on it, I change his color and modify its checkstate.

When my listbox gets focus and when I click on an item, the first Item of the list is processed too, because it seems to be active since the beginning my listbox has focus...After that there is no other problem of this kind, this just happens for the first selection!

Any idea to prevent the first Item of the listview from being Active ?

Or any idea of the problem if I'm wrong ?

 

Parents Reply
  • 460
    posted in reply to Brian Fallon

    Hi thank you for your answer.

    I was not referring to an already existing "Mark" property, I know there is no such property existing. I was referring to a property that you add to your control when you create a new control which inherits from UltraListView.

    I did join you a text file in which you'll be able to see my Custom List Box.

    If you have time you can bind it to whatever you want in your test program.

    You'll see the way the component works when you will execute it.

    The problem is when an item is already selected in blue cyan and if I select it again, it remains cyan although it should turn white. I know that it is because I've set 'cyan' as the selection default color ! I don't know how to get arround this problem. You'll see that the checkboxes are not necesarry too, but the ultralistview is the only way I've found to build this type of component.

Children
No Data