Traditional Culture Encyclopedia - Hotel reservation - Do any heroes know how to use datagridview to make a hotel room map, just like the following effect. Especially the icon on the cell! !

Do any heroes know how to use datagridview to make a hotel room map, just like the following effect. Especially the icon on the cell! !

I think you have asked this question twice. Let me help you ~

Theoretically, if you are careful, the cover painting event will not get stuck, because you can control any part of the painting.

Just your request, in fact, is not so complicated at all. It is enough to write a user control by yourself, mainly relying on the layout of tableLayoutPanel.

I took the time to make one for you, just reading the data and various UI events and filling it out by myself.

Ps 1: I put the specific information of each room in the label of a single room control.

Ps2: All interface elements are adaptive. Scaling the main form at will will not affect the refresh speed too much.

Ps3: I extracted the status icon and made a status class. Define your own icon size. The default is 16x 16 vertical flow layout.

Ps4: My notes are all in English, so I'll make do with them, haha.

Rendering:

After stretching and scaling:

Finally, attach the complete source code, including part of linq, please use vs20 10.

QQ 176229432, welcome to harass.

Spit out a word: what about the big gift, the gift, the gift? ...