I'm open to any idea besides using a ListView for this. (I've thought of using a flow layout panel and RadButton as one alternative.)
In my project where we are picking items for customer orders a "License Plate" is a number that uniquely identifies the box that we are using to put the items that we pick for the order. There are normally three license plates per order and there could be a few more added as we pick. The user would like to see all of the license plates in a horizontal row (scrolling won't be a problem) and have the person click one of them to assign whatever quantity of an item to that box. (That is as simple as a button or something that looks like a button with the license plate number for its text.)
So, if a ListView is a good idea here, I'm trying to use one in IconsView mode to take advantage of the horizontal orientation. I did this so far...
lvLicensePlates.ViewType = ListViewType.IconsView;
lvLicensePlates.AllowArbitraryItemWidth =
true
;
lvLicensePlates.AllowArbitraryItemHeight =
true
;
lvLicensePlates.AllowEdit =
false
;
lvLicensePlates.AllowRemove =
false
;
lvLicensePlates.SelectLastAddedItem =
false
;
lvLicensePlates.ListViewElement.ViewElement.Orientation = Orientation.Horizontal;
lvLicensePlates.ListViewElement.ViewElement.ItemSpacing = 20;
I would like to give the items more of the RadButton appearance. I started experimenting with VisualItemFormatting...
private
void
LvLicensePlates_VisualItemFormatting(
object
sender, ListViewVisualItemEventArgs e)
{
e.VisualItem.BorderBoxStyle = BorderBoxStyle.SingleBorder;
e.VisualItem.DrawBorder =
true
;
}
but that hasn't produced a border for me.
If you could first tell me if a different control would be a better choice and, if not, can you help me make the item look like a RadButton (or better, since I suspect that you have better ideas than I would).
Thank you,
Gary