C# - Problem´s changing the ImageSize (ImageList)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SpaceMind

    C# - Problem´s changing the ImageSize (ImageList)

    Hi, I´m using this code for changing the size property of an ImageList :
    ImageList.Image Size = new Size(32,32);

    However , the Icon property just lost´s his data.

    Before code:

    ImageList.Image s.Count == 1

    After:

    ImageList.Image s.Count == 0

    Anyone have an idea ???

    PS: The image it´s an ICO with 16x16 and 32x32. It work´s if I change the
    imageSize at design time.

    Sorry about my poor english and Thanks !!! :=)


  • Ed Kaim [MSFT]

    #2
    Re: C# - Problem´s changing the ImageSize (ImageList)

    All images in an ImageList are expected to be the same size (or will be fit
    into it when added). Changing the size resets the ImageList If you need to
    programmaticall y resize the ImageSize property, do it before adding the
    images.

    "SpaceMind" <viniciusfbo@ho tmail.com> wrote in message
    news:uQhdgT%23k DHA.3688@TK2MSF TNGP11.phx.gbl. ..[color=blue]
    > Hi, I´m using this code for changing the size property of an ImageList :
    > ImageList.Image Size = new Size(32,32);
    >
    > However , the Icon property just lost´s his data.
    >
    > Before code:
    >
    > ImageList.Image s.Count == 1
    >
    > After:
    >
    > ImageList.Image s.Count == 0
    >
    > Anyone have an idea ???
    >
    > PS: The image it´s an ICO with 16x16 and 32x32. It work´s if I change the
    > imageSize at design time.
    >
    > Sorry about my poor english and Thanks !!! :=)
    >
    >[/color]


    Comment

    Working...