Peter Kiers
asked on
Explenation needed about a methode
Hi,
Can someone translate this for me, the most easiest way.
Because I am terrible in math:
private void SizeLastColumn(ListView lv)
{
int x = lvNotes.Width / 15 == 0 ? 1 : lvNotes.Width / 15;
lvNotes.Columns[0].Width = x * 2;
lvNotes.Columns[1].Width = x;
lvNotes.Columns[2].Width = x * 2;
}
Peter
Can someone translate this for me, the most easiest way.
Because I am terrible in math:
private void SizeLastColumn(ListView lv)
{
int x = lvNotes.Width / 15 == 0 ? 1 : lvNotes.Width / 15;
lvNotes.Columns[0].Width = x * 2;
lvNotes.Columns[1].Width = x;
lvNotes.Columns[2].Width = x * 2;
}
Peter
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What the purpose of the ?-sign. What does that mean?
P.
P.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oke only thing i don't get is the function of the ? sign.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the information.
Peter Kiers
Peter Kiers
resize the columns:
0 -> x by 2
1 -> x
2 -> x by 2