質問

how do i highlight the selected item (in my case, a custom user control) in a flowlayoutpanel

役に立ちましたか?

解決

FlowLayoutPanel is purely for layout - it has no concept of a "selected item". You might be able to add some logic to your UserControl which changes its colour when it receives focus (and changes back when it loses focus) but that would be independent of the layout control that's hosting it.

他のヒント

I created a Bindable FlowLayoutPanel that included setting the selected index (with highlighting depending on the selected control. I posted it over on the code review site. Check it out and let me know if that works for you.

Check this implementation, Through event handling

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top