Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

DataGridView Grid Borders

$
0
0

Hi


I have a DataGridView with 8 columns, all Text Box columns, all Read Only, populated from an indexed file.  The first tow columns are frozen.  I want the right hand border on the second column to appear thicker than the others.  Here is the code I tried to achieve this:

       class-id DataGridViewColFrzCls inherits type System.Windows.Forms.DataGridViewColumn.

       method-id NEW.
       procedure division.
           set self::CellTemplate to new DataGridViewCellFrzCls.
           goback.
       end method.

       end class.



       class-id DataGridViewCellFrzCls inherits type System.Windows.Forms.DataGridViewTextBoxCell.

      *> Automatically inserted Methods from System.Windows.Forms.DataGridViewTextBoxCell

       method-id AdjustCellBorderStyle override.
       procedure division using by value
                                   dataGridViewAdvancedBorderStyle as type System.Windows.Forms.DataGridViewAdvancedBorderStyle
                                   dataGridViewAdvancedBorderSty0 as type System.Windows.Forms.DataGridViewAdvancedBorderStyle
                                   singleVerticalBorderAdded as condition-value
                                   singleHorizontalBorderAdded as condition-value
                                   isFirstDisplayedColumn as condition-value
                                   isFirstDisplayedRow as condition-value
                          returning return-item as type System.Windows.Forms.DataGridViewAdvancedBorderStyle.
                          
           set dataGridViewAdvancedBorderSty0::Top to type DataGridViewAdvancedCellBorderStyle::None.
           set dataGridViewAdvancedBorderSty0::Left to dataGridViewAdvancedBorderStyle::Left.
           set dataGridViewAdvancedBorderSty0::Bottom to dataGridViewAdvancedBorderStyle::Bottom.
           set dataGridViewAdvancedBorderSty0::Right to type DataGridViewAdvancedCellBorderStyle::OutsetDouble.
           
      *    set return-item to super::AdjustCellBorderStyle(dataGridViewAdvancedBorderStyle dataGridViewAdvancedBorderSty0 singleVerticalBorderAdded singleHorizontalBorderAdded isFirstDisplayedColumn isFirstDisplayedRow)
           set return-item to dataGridViewAdvancedBorderSty0
            goback
       end method.
      *> End Methods from System.Windows.Forms.DataGridViewTextBoxCell
      
       end class.

I have set column 2 to be DataGridViewColFrzCls, all the other columns are DataGridViewTextBoxColumn.

The code above only has the effect of making the left hand border, not the right hand border of cells in column 2 thicker.

Can someone tell me what I am doing wrong?  It may have something to do with column 2 being forzen.

Using Visual Cobol 2.1 Visual Studio 2010.

Thank you.


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>