Hi all,
I'm trying to create AutoCAD add-in to preview .bmp files
I have snippet code to do the following
- Tow ListBoxis binded together. the first one show directory and the second show subfolder.
- DataGridView to show the .bmp files.
- private void Form1_Load(object sender, EventArgs e)
- {
- listBox1.DataSource = Directory.GetDirectories(rootDirectory).Select(Path.GetFileName).ToList();
- listBox1.SelectedIndexChanged += ListBox1_SelectedIndexChanged;
- listBox2.SelectedIndexChanged += ListBox2_SelectedIndexChanged;
-
- DataGridViewImageColumn dgvimgcol = new DataGridViewImageColumn();
- dgvimgcol.ImageLayout = DataGridViewImageCellLayout.Stretch;
- dgvimgcol.Width = 250;
- dgvimgcol.HeaderText = "Blocks";
- dataViewImages.RowTemplate.Height = 300;
- dataViewImages.Columns.Add(dgvimgcol);
- dataViewImages.AllowUserToAddRows = false;
- dataViewImages.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill;
- }
and i got this
- I need to Set only one colomn (Blocks).
- add double click event to insert the dwg file.