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

AutoSize of radbutton

6 Answers 56 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Renato Lopes
Top achievements
Rank 1
Renato Lopes asked on 04 Aug 2008, 02:47 PM
Hi.

I'm using a radbutton with a image. When I try to customize the UI element, if I Change the AutoSize property to False of the Text Layout, so I can use the Location to change the position of the text in the button, the text doesn't show when running my application. If I change the location with the AutoSize True, the text shows, but in the wrong place. Can you give me a solution?

Thanks

6 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 05 Aug 2008, 02:28 PM
Hi Renato Lopes,

Thank you for writing.

I am afraid that I cannot understand your scenario in details. Please, give me a step-by-step how-to for reproducing the issue. It would also help me if describe what exactly is your goal.  

I am looking forward to your reply.

Greetings,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Renato Lopes
Top achievements
Rank 1
answered on 06 Aug 2008, 09:38 AM
hi.

please see this video:

http://rgomesf.googlepages.com/1.swf.html

Hope it helps.
0
Renato Lopes
Top achievements
Rank 1
answered on 06 Aug 2008, 09:38 AM
hi.

please see this video:

http://rgomesf.googlepages.com/1.swf.html

Hope it helps.
0
Martin Vasilev
Telerik team
answered on 08 Aug 2008, 10:17 AM
Hello Renato,

Thank you for the video.

The text is not visible because Location property is not serialized when changes are made in design-time. You have to set it only by code. Also, it is not necessary to change the AutoSize property. If it is true, the location works like an offset (negative values are allowed) :
this.radButton1.ButtonElement.TextElement.Location = new Point(0, 20); 

If you have other questions, do not hesitate to contact me again.

All the best,
Martin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Renato Lopes
Top achievements
Rank 1
answered on 08 Aug 2008, 10:57 AM
Hi. I try that but doesn't work. If I set AutoSize to false, the text doesn't shows even if I set the location by code. With the AutoSize set to True, text is showed ind the whong position!
0
Accepted
Boyko Markov
Telerik team
answered on 08 Aug 2008, 12:41 PM
Hello Renato Lopes,

You can set any Point for a location, so you can set the value you like.
For example you can use the following points - { new Point(10, 5), new Point(5,5), new Point(15, 15) }.

this.radButton1.ButtonElement.TextElement.Location = new Point(0, 20); 

Is there any particular reason for you to change the AutoSize property to false? I would suggest you use the location property to move the text where you want.

I hope this helps.
Please write me back if you have more questions.

Sincerely yours,
Boyko Markov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Renato Lopes
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Renato Lopes
Top achievements
Rank 1
Boyko Markov
Telerik team
Share this question
or