|
-
Jun 15th, 2020, 07:50 PM
#1
Thread Starter
Lively Member
[HELP ME] resize pictures streched in datagribview![for beginner]
Hello everybody!
i have light problem! i have a datagribview with this code:
For Each DataGridViewImageColumn In Form1.DataGridView2.Columns
DataGridViewImageColumn.ImageLayout = DataGridViewImageCellLayout.Stretch
Next
Form1.DataGridView2.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill
Form1.DataGridView2.RowTemplate.Height = 70
Dim newItems() As String = Form1.ListBox2.Items.Cast(Of String).Select(Function(s) s.Split(" "c).Last & " " & s.Split(" "c).Last).ToArray
Dim newItemsA() As String = Form1.ListBox2.Items.Cast(Of String).Select(Function(s) s.Split(" "c).Last & " " & s.Split(" "c).First).ToArray
Form1.DataGridView2.DataSource = Enumerable.Range(1, newItems.Length).
Select(Function(n) New With {.Rank = n, .Image = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif" & newItems(n - 1).Substring(newItems(n - 1).IndexOf(" ") + 1) & ".png"), .Name = newItemsA(n - 1)}).
ToArray()
but the second column with pictures are not resized or no streched. i would like a piece of coding in order to the pictures be resized or same size streched.
thank you in advance for your answers and help!
sorry for my english, i am from france and started coding.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|