I have a flow layout panel, which i add a Dictionary of Linklables too
Is it possible to add the two to the flow layout panel (as in 2 i mean key and value) next to each other as long as the value.text != “somevalue” in whcih case i want to just add the key to that line.
Here is some sample data and output in the form key and value
"Label1" "good stuff"
"Label2" "somevalue"
"Label3" "somevalue"
"Label4" "good stuff"
would be displayed as
Label1 GoodStuff
Label2
Label3
Label4 GoodStuff
I think it’s better to use a
TableLayoutPanelfor this one.Since it supports multiple columns, you can just add Labels (or any other control) on a row for both columns and then hide (set
Visibleto false) the Label on the second column if its content does not match the desired value.I’d suggest you read about the TableLayoutPanel on MSDN. Here’s the link: http://msdn.microsoft.com/en-us/library/system.windows.forms.tablelayoutpanel.aspx