3 Answers, 1 is accepted
0

Richard Slade
Top achievements
Rank 2
answered on 11 Mar 2011, 12:02 PM
Hello BB,
This is the same principal as your previous post with using HTML Like formatting to display what you need on your button. In this case you could use something like the following exmaple
Hope this helps
Richard
This is the same principal as your previous post with using HTML Like formatting to display what you need on your button. In this case you could use something like the following exmaple
this
.radButton1.Size =
new
Size(137, 67);
string
html;
html =
"<html>"
;
html += @
"<br>"
;
html += @
"<img src="
"C:\Users\Richard\Documents\Resources\Image1.png"
"> <span style="
"font-size:8.25"
">Text 1</span><br>"
;
html += @
"<img src="
"C:\Users\Richard\Documents\Resources\Image2.png"
"> <span style="
"font-size:8.25"
">Text 1</span><br>"
;
html += @
"<img src="
"C:\Users\Richard\Documents\Resources\Image3.png"
"> <span style="
"font-size:8.25"
">Text 1</span><br>"
;
html +=
"</html>"
;
this
.radButton1.Text = html;
Hope this helps
Richard
0

Richard Slade
Top achievements
Rank 2
answered on 15 Mar 2011, 10:41 AM
Hello,
Did this help? If so please remember to mark as answer. If you need further assistance, please let me know.
Thanks
Richard
Did this help? If so please remember to mark as answer. If you need further assistance, please let me know.
Thanks
Richard
0
Hello BB,
Thank you for writing.
Another approach is to remove the ImageAndTextLayoutPanel that RadButton contains in its Children collection and add elements that suit your requirement. Here is a sample of this:
I hope this helps.
Best wishes,
Stefan
the Telerik team
Thank you for writing.
Another approach is to remove the ImageAndTextLayoutPanel that RadButton contains in its Children collection and add elements that suit your requirement. Here is a sample of this:
radButton1.ButtonElement.Children.RemoveAt(1);
LightVisualElement element1 =
new
LightVisualElement();
element1.Image = Image.FromFile(@
"C:\Program Files (x86)\Telerik\RadControls for WinForms Q2 2010 SP2\Examples\Resources\SE.png"
);
element1.ShouldHandleMouseInput =
false
;
element1.ImageAlignment = ContentAlignment.BottomLeft;
element1.ImageLayout = ImageLayout.None;
LightVisualElement element2 =
new
LightVisualElement();
element2.Image = Image.FromFile(@
"C:\Program Files (x86)\Telerik\RadControls for WinForms Q2 2010 SP2\Examples\Resources\SE.png"
);
element2.ShouldHandleMouseInput =
false
;
element2.ImageAlignment = ContentAlignment.MiddleLeft;
element2.ImageLayout = ImageLayout.None;
LightVisualElement element3 =
new
LightVisualElement();
element3.Image = Image.FromFile(@
"C:\Program Files (x86)\Telerik\RadControls for WinForms Q2 2010 SP2\Examples\Resources\SE.png"
);
element3.ImageAlignment = ContentAlignment.TopLeft;
element3.ShouldHandleMouseInput =
false
;
element3.ImageLayout = ImageLayout.None;
LightVisualElement element4 =
new
LightVisualElement();
element4.ShouldHandleMouseInput =
false
;
element4.TextAlignment = ContentAlignment.BottomRight;
element4.Text =
"test"
;
LightVisualElement element5 =
new
LightVisualElement();
element5.ShouldHandleMouseInput =
false
;
element5.TextAlignment = ContentAlignment.MiddleRight;
element5.Text =
"test"
;
LightVisualElement element6 =
new
LightVisualElement();
element6.ShouldHandleMouseInput =
false
;
element6.TextAlignment = ContentAlignment.TopRight;
element6.Text =
"test"
;
radButton1.ButtonElement.Children.Add(element1);
radButton1.ButtonElement.Children.Add(element2);
radButton1.ButtonElement.Children.Add(element3);
radButton1.ButtonElement.Children.Add(element4);
radButton1.ButtonElement.Children.Add(element5);
radButton1.ButtonElement.Children.Add(element6);
I hope this helps.
Best wishes,
Stefan
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!