As shown in figure, I need to make a list with buttons on each item, one button at down left of the item, and some on the down right.
I Make the demo app using ListBox
control and some Buttons within Panel above on ListBox
, but when the ListBox
scrolling, it's difficult to make the Buttons follow the ListItem
.
who can help, thanks~~~
I got the way to make it!so, I'll post the answer myself~, but Remy Lebeau inspired me. in the beginning, I used
DrawFrameControl()
to make button on list, It works but the style was look like classic windows style, and it's hard to make back color like the pic in the example. then, I usedFillRect()
andDrawEdge()
make the Button, I think it's well, here is the code:The following work is store the Rect of Buttons in memory, write the ButtonOnClick event code, and calling ButtonOnClick event at
ListMouseUp()
event after judge if Mouse Hit Position is in the Button Rect, The Code is not important like the above drawing Buttons, so it is omitted