datagridviewbuttoncolumn size

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • devlin
    New Member
    • Mar 2008
    • 14

    datagridviewbuttoncolumn size

    Hi.
    I have a windoes form with a datagridview. it has a datagridviewbut toncolumn. the problem is they are growing to the whole size of the cell. is there anyway to change the size of these buttons?
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Under the CellStyle for the column (DefaultCellSty le I think) there is a "padding" property. That should get you what you need?

    Comment

    • devlin
      New Member
      • Mar 2008
      • 14

      #3
      Thats actually quite a good idea. Thank you. Unfortunately not the solution for me, as my rows have multiple lines so the button heights will vary with each row. im looking for a way for buttons to all be the same size.

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Well I believe that top/bottom will always be the same size if you apply NO padding options right? So what about just applying them to left and right sides?
        I'm not sure this can be done in a normal fashion.
        It possible you can derrive a class from some base datagridviewcol umn object and implement your own button control?

        Comment

        Working...