Link to home
Start Free TrialLog in
Avatar of Peter Kiers
Peter KiersFlag for Netherlands

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
Avatar of Eyal
Eyal
Flag of Israel image

put in x 1 if listview width divided to 15 is zero otherwise put the devision result
resize the columns:
0 -> x by 2
1 -> x
2 -> x by 2
SOLUTION
Avatar of Bill Nolan
Bill Nolan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Peter Kiers

ASKER

What the purpose of the ?-sign. What does that mean?

P.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oke only thing i don't get is the function of the ? sign.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the information.

Peter Kiers