C
C#β€’6d ago
Lupusregina Beta

How do you kill off left padding/margin in DataGridView headers?

It's driving me nuts. Padding is all zeroes. I assumed setting TopLeft alignment would do it, but in fact Left align makes it worse. Center makes it better and right is the best (looking at the items column). What the heck? Is there any way to snug header text up to the left with little to no padding?
No description
7 Replies
𓀠𓀒𓀑𓀬
margin? maybe margin-left? margin-left: 100px; css or use grid .gallary { display: grid; position: relative; padding-top: 110px; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 5vw); grid-gap: 15px; text-align: center; border: 50px solid; border-radius: 50px; border-color: blue; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); top: -1500px; } grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 5vw); grid-gap: 15px; text-align: center; use this grid-column-start: 1; grid-column-end: 5; grid-row-start: 1; grid-row-end: 5; and this for each item grid-column-start: 4; grid-column-end: 7; grid-row-start: 1; grid-row-end: 6;
𓀠𓀒𓀑𓀬
you will end up with something like this
No description
𓀠𓀒𓀑𓀬
if you play arround with it you may get what you want @Lupusregina Beta
jcotton42
jcotton42β€’6d ago
@𓀠𓀒𓀑𓀬 the post is tagged winfroms; CSS isn’t applicable here.
Lupusregina Beta
Lupusregina BetaOPβ€’5d ago
Yea, I'm afraid I'm old school hehe. Using VS2017 and WinForms. I know, I know.. I need to get with it already and learn WPF I just haven't gotten around to it. Thanks though!
jcotton42
jcotton42β€’5d ago
Forms is fine, just suboptimal. But why VS2017?
Lupusregina Beta
Lupusregina BetaOPβ€’5d ago
I installed 20... 22? i think it was at one point and it seemed really laggy. Like intellisense would take a couple seconds to update, it was frustrating. 2017 is lightning fast, so I just went back to it. Some day I'll hit a wall where I need newer than .NET 4.8 and that will force me to upgrade, but haven't hit it yet hehe. Of course, now that I think about it, this was a few years ago and since then I've bought a new rig; Core i7-13700K 3.4ghz, 128GB DDR4-3200, Samsung 990 Pro M.2 SSD so maybe I should try again. I can't imagine how VS could lag that, lol

Did you find this page helpful?