Changing Selected Image Size!

7 posts, 0 answers
  1. david
    david avatar
    3 posts
    Member since:
    Jun 2010

    Posted 24 Jun 2010 Link to this post

    Hi,

    I am just getting to terms with the carousal and its working great. There is just a couple of things I am trying to get right. Maybe you can help me.

    I have created some test code which adds the image list at runtime just looking at a directory. Code is displayed below. The code works fine but all the items are the same size. What I need is the selected item to be a larger size so they stand out from the rest. Also if its not too much work I want the rest of the items in the background to be slightly dimmed out just to emphasize on this.

    PLEASE HELP...

    Thanks



    private void CreateCarouselItems()
            {


                //pictureBox2.Image = Image.FromFile("D:\\IMAGES\\1.jpg");

                int[] myInterger = new int[1];
                for (int i = 1; i < 100; i++)
                {
                    RadButtonElement carouselItem = new RadButtonElement();
                    carouselItem.ImageAlignment = ContentAlignment.MiddleCenter;
                    carouselItem.TextAlignment = ContentAlignment.MiddleCenter;
                    carouselItem.TextImageRelation = TextImageRelation.ImageAboveText;
                    carouselItem.ShowBorder = true;
                    carouselItem.Text = "Peter Pan";
                    carouselItem.ForeColor = Color.WhiteSmoke;
                    carouselItem.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit;

                    carouselItem.BackColor = Color.YellowGreen;


                    Bitmap b;
                    b = (Bitmap)Image.FromFile("D:\\IMAGES\\" + i.ToString() + ".jpg");
                    carouselItem.Image = ResizeBitmap(b, 90, 60);


                    this.radCarousel1.Items.Add(carouselItem);
                }


            }

  2. david
    david avatar
    3 posts
    Member since:
    Jun 2010

    Posted 24 Jun 2010 Link to this post

    Ok,

    I have had some luck in the selected index change even. But the only problem is that when the item I made larger moves along it remembers its image size so I guess I also need to reset all the other items as well as the selected item. I still have no idea how to dim out the unselected items. This is the code I have got so far...

    private void radCarousel1_SelectedIndexChanged(object sender, EventArgs e)
            {
                RadButtonElement carouselItem = (RadButtonElement)radCarousel1.SelectedItem;
                Bitmap b;
                b = (Bitmap)Image.FromFile("D:\\IMAGES\\" + "2" + ".jpg");
                carouselItem.Image = ResizeBitmap(b, 150, 100);

            }

  3. DevCraft Release
  4. Peter
    Admin
    Peter avatar
    1143 posts
    Member since:
    Sep 2012

    Posted 30 Jun 2010 Link to this post

    Hi david,

    Thanks for writing.

    I have prepared a small example on how you can dim and resize background pictures.

    Hope this helps.

    Greetings,
    Peter
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

  5. Kevin
    Kevin avatar
    14 posts
    Member since:
    Jul 2012

    Posted 27 Jul 2012 Link to this post

    Hmmmm,

    i tried your sample project but it didnt work, just looked a mess to be honest. Huge red panels with a very small image in the middle. Didnt see anything that was dimmed.

    ive a 13inch mac so it took up the entire screen, maybe you could resend the sample but make a few small adjustments :)

    Thank you for your time

    Regards
    Kevin

  6. Peter
    Admin
    Peter avatar
    1143 posts
    Member since:
    Sep 2012

    Posted 30 Jul 2012 Link to this post

    Hello Kevin,

    Š¢hank you for contacting Telerik support.

    I noticed that you have been downloading our Trial controls since 2010, but are still not our customer. 
    We will be grateful if you share the reasons which prevent you from obtaining a Dev license during this period. Your feedback regarding your overall experience with our suite will be highly appreciated. If you like the product, you can purchase one of the licenses that we offer: http://www.telerik.com/purchase.aspx. These licenses comes with Dev priority support where the tickets should be answered in a guaranteed period of time. Shortly said, we will provide you with quicker responses.

    In regards to your question at hand, I upgraded the application from the ticket to our latest version (2012.2.726) and everything looks good - please refer to the attached screen shot and to the upgraded application.

    Could you clarify in greater details (screen shots, video) what goes wrong from your side?

    Greetings,
    Peter
    the Telerik team

    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>

  7. Kevin
    Kevin avatar
    14 posts
    Member since:
    Jul 2012

    Posted 30 Jul 2012 Link to this post

    On my end the panels were huge and coloured red with very small images in the middle, nothing like the one i see now.

    I have been using the trial version of your controls since 2010 because i was a student until 2012. I have now graduate and im working towards getting the cash available for a development licence. You must also bear in mind that im a hobbiest and not a developer. I build a movie application for myself, to pay 1600 per year is just mad!!

    i dare you to offer me a discount :)

    Kevin

  8. Stefan
    Admin
    Stefan avatar
    2452 posts
    Member since:
    Sep 2012

    Posted 31 Jul 2012 Link to this post

    I am glad that everything is OK now. 

    In regards to the license. This is a sales related question and I will have someone from the sales team contact you via email.
     
    Regards,
    Stefan
    the Telerik team

    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>

Back to Top
DevCraft Release