This is a migrated thread and some comments may be shown as answers.

RadButton image size

12 Answers 1510 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 14 May 2008, 08:52 PM
I have one image that I use in several places...so in the resources for my project it's sized to 128x128.  In a RadButton that I use, I need the image to be 24x24.  How can I accomplish this without having numerous copies of my image at different sizes?

12 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 15 May 2008, 02:54 PM
Hello Bob,

Thank you for the question.

You could set the Image size in RadButton by using the ImagePrimitive properties:

  1. Click on the smart tag of your RadButton and choose "Edit UI elements"
  2. In the Control element structure navigate to ImagePrimitive.
  3. Change MinSize and MaxSize's Height and Width properties to 24
  4. Change ImageLayout to Strech
Now you should have an image resized to the desired size in your RadButton.

I hope this helps. If you need additional assistance, do not hesitate to contact me again.

 
Kind regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 15 May 2008, 03:23 PM
Perfect - thank you!
0
Shirya
Top achievements
Rank 1
answered on 02 Jul 2009, 02:59 PM
Hello,
I try to do the same with a radDropDownButton, but it does not work.
How can i make it work?
Thank you

--Nevermind, i was changing the radArrowButtonElement Properties
0
Martin Vasilev
Telerik team
answered on 07 Jul 2009, 12:30 PM
Hi Shirya,

Thank you for writing.

The principle is the same for every RadControl, just navigate to the ImagePrimitive for the desired element and make the same settings as described in my previous message.

Write me back if you have other questions.

Greetings,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
lena
Top achievements
Rank 1
answered on 25 Aug 2011, 08:29 PM
Hi
I cannot find "Edit UI elements" anywhere on my RadButton. Can you help please?
Thanks
Lena
0
Martin Vasilev
Telerik team
answered on 29 Aug 2011, 02:14 PM
Hello Lena,

You can find the "Edit UI elements" item in the context menu, which opens at design time through the RadButton's smart tag. Please take a look at the attached image to this message.

Hope this helps. Let me know if you have any other questions.

Kind regards,
Martin Vasilev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Rob
Top achievements
Rank 1
answered on 17 Nov 2011, 11:57 AM
Hi Martin,
This used to work perfectly up until Q3 2011, when the photo was back to large size. I discovered that if, under Image Primitive, you change Layout Autosize to False, it would go back to the right size but... the image is now aligned left and no longer centered.
I have attached a screen shot from Q2 2011, then Q3 2011.
What I want is to have it back centered at per Q2 2011.
Any idea? the original image size is 128 x 128
Update: (Please ignore the 1st screenshot as it had the wrong section taken for Q2 2011)
So really from the screenshot, I want to use Q3 2011 to have the same result as Q2 2011.
0
Martin Vasilev
Telerik team
answered on 22 Nov 2011, 09:21 AM
Hello Peter Woodward,

Thank you for writing.

I would suggest using ImageScalling property and set it to SizeToFit value. This should work for the latest version of RadControls for Winforms. You can find this property in Element Hierarchy Editor, under ImagePrimitive element.

Hope this helps. Let me know  if you have any additional questions.

Greetings,
Martin Vasilev
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Jo A. Kim
Top achievements
Rank 1
answered on 24 Sep 2012, 07:57 AM
Hi Martin
I also can not find the "Edit UI elements" contextmenu anywhere on the Radbutton.
Can You please help.
Best regards
Jo A. Kim
0
Anton
Telerik team
answered on 27 Sep 2012, 07:56 AM
Hi Jo A. Kim,

Thank you for writing.

Please read Martin's post from Aug 29, 2011 where he explains how to access the desired elements collection. There is also a screen shot provided.

Here I would like to summarize how to resize the Image in RadButton by using the ImagePrimitive properties with our latest version:
  1. Click on the smart tag of your RadButton and choose "Edit UI elements"
  2. In the Control element structure navigate to ImagePrimitive.
  3. Change MinSize and MaxSize's Height and Width properties to 24
  4. Change ImageLayout to Strech
  5. Change ImageScalling property  to SizeToFit value

I hope this information helps. If you have further questions, feel free to write back.

Greetings,
Anton
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
0
Jo A. Kim
Top achievements
Rank 1
answered on 27 Sep 2012, 09:22 AM
Hi Anton,
I wrote "I also can not find the "Edit UI elements" contextmenu anywhere on the Radbutton."
It means: There is no "Edit UI Elements" on the smart tag!!!!

Best Regards
Jo A. Kim

0
Anton
Telerik team
answered on 01 Oct 2012, 01:15 PM
Hi Jo A. Kim,

Thank you for writing.

This forum concerns Telerik WinForms controls, while it seems that you are using the Telerik ASP.NET AJAX controls. Please post your questons in the appropriate forums to get appropriate answer to your questions: http://www.telerik.com/community/forums/aspnet-ajax.aspx.

I hope this information helps.

Kind regards,
Anton
the Telerik team
RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Bob
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Bob
Top achievements
Rank 1
Shirya
Top achievements
Rank 1
lena
Top achievements
Rank 1
Rob
Top achievements
Rank 1
Jo A. Kim
Top achievements
Rank 1
Anton
Telerik team
Share this question
or