Ruben
Ruben

Reputation: 155

Set static control at the top of TableLayoutPanel

I have a TableLayoutPanel and inside it, I want to add FlowLayoutPanel

So I added it and it works, but now I want to know how can I make that FlowLayoutPanel static at the top of TableLayoutPanel because when I scroll TableLayoutPanel the FlowLayoutPanel just disappear because is at the top of the list. Is it possible to set static control inside a TableLayoutPanel?

Upvotes: 0

Views: 197

Answers (1)

Bee-
Bee-

Reputation: 64

I don't know if there is a way adding frozen row to TableLayoutPanel. But you can make this:

Don't add FlowLayoutPanel on that TableLayoutPanel. Instead, use another TableLayoutPanel with 2 rows and 1 column. Add FlowLayoutPanel to the top of the new TableLayoutPanel and add your actual TableLayoutPanel to 2nd row with autoscroll enabled. At the image: the blue one is outer TableLayoutPanel, the black one is FlowLayoutPanel and the gray one is inner TableLayoutPanel. I set Margins as 5 to show all objects, you can set Margins as 0.

Example Image

Upvotes: 2

Related Questions