Hi,
I found how to put into radlabel a image here: https://www.telerik.com/forums/image-for-label and here is my code:
((TextPrimitive)this.lblTitle1.LabelElement.Children[2].Children[1]).Font = new Font("Roboto", 32, FontStyle.Bold);
ImagePrimitive imgPrimitive = new ImagePrimitive();
this.lblTitle1.RootElement.Children[0].Children.Add(imgPrimitive);
imgPrimitive.Image = WSResourceManager.UiImageProvider.InfoYellowIcon.Get(WSConfigurationManager.GetInstance.GetLargeIconSize());
Now I would like to align the image to the text that is centered (designer):
but as a result I get this (result):
How can I align this icon to the text?
Hi, I found out that for some languages like Hungarian <html> tag used in radLabel.text white spaces are escaped.
See an example below:
Is there a way to not remove these white spaces?
Br
Pawel
Is it possible to mimic an <hr> tag in the Html markup functionality? Trying to create dividers in the RadLabel control. Has anyone implemented something similar?
Thanks!
Hi,
I'm using my custom template and I would like to adjust the hyperlink color in RadLabel.
Is there a way to change the color of the hyperlink? The hyperlink is set using an HTML tag. For example: "lblMessageText.Text = "<html>New software version: <a href=www.xyzcom/update>www.xyz.com/update</a>."?
Best regards
Pawel
Hi,
I want to display text above the (bottom) border. Therefore, I am experimenting with RadLabel and tried this by setting the ZIndex of LabelElement.LabelText above the ZIndex of LabelElement.LabelBorder which unfortunately does not work. All overlapping letters are just cut. Now, I would need to expand the controls size by which the border would move further below the text which is not what I want.
How can I achieve this?
It would be even better if the border would leave some space around the text like in your web menu here on any "overlapping" letter ("j", "g", "p", "q", "y") but I assume this is not possible.
Hi,
I have issues in my application which makes use of HTML formatted text in RadLabel. The issue I have is that spaces between words can get lost. This is easy to reproduce using the your latest demo application for Winforms R1 2023 SP1.
See this screen shot which shows there are spaces between every word.
I believe this issue manifests in grid view and probably all other controls which render HTML based text.
Thanks
Toby
Hi,
I have an issue with the following simple code where I drag a label over a GridView header. The DragDrop codes works fine.
I recently added the following ligne
SetLabelBorder(sourceLabel, true);
In the DynamicLabel_MouseDown event handler starting the DragDrop along with the DynamicLabel_MouseUp event handler.
The labelBorder is normally setup in the MouseDown event, but even if I simply click on the label and release it, the MouseUp event is not called and the border cannot be suppressed.
Here is the related code:
RadLabel? PreviousLabelWithBorderSet = null; private void DynamicLabel_MouseDown(object? sender, MouseEventArgs e) { sourceLabel = sender as RadLabel; if (sourceLabel != null) { if (e.Button != MouseButtons.Left) return; isCurrentlyDragging = true; objCurrentlyDragged = DragObject.Label; SetLabelBorder(sourceLabel, true); gvCsvData.DragDrop += gvCsvData_DragDrop; if (sourceLabel != null) DoDragDrop(sourceLabel.Text, DragDropEffects.Copy); } } private void DynamicLabel_MouseUp(object? sender, MouseEventArgs e) { sourceLabel = sender as RadLabel; if (sourceLabel != null) { if (e.Button != MouseButtons.Left) return; if (sourceLabel != null) SetLabelBorder(sourceLabel, false); } } private void SetLabelBorder(RadLabel labelBorder, bool setBorder) {
// Temporary : At least suppress previous label border if new one is selected !! if (PreviousLabelWithBorderSet != null) { PreviousLabelWithBorderSet.LabelElement.BorderVisible = false; PreviousLabelWithBorderSet = null; } if (setBorder) { labelBorder.LabelElement.BorderVisible = true; PreviousLabelWithBorderSet = labelBorder; } else { labelBorder.LabelElement.BorderVisible = false; } }
What am I doing wrong ?
Thanks
Patrick
Hello everyone!
EDIT: Also read the comment!
I'm currently moving some projects from DotNetBar to Telerik UI WinForms and trying a bit around the HTML makrup feature.
Is there a way to hook to an event to provide a custom way to resolve the "src" attribute of the "img" node, like in DotNetBar (see picture)? I searched thorugh all the assemblies using the IDE and I searched throw the forum, but yet I'm still not sure if there is maybe already an option for and I just can't find it.
With this custom handling it would be possible to use already loaded images or provide images from a custom destination e.g. from a ResX file. All my images and icons are stored in ResX files and I really want to avoid to put some of icons also as embedded ressource because they are already available within a resource file itself.
(Tagged as "Label" as "Markup" or "Html" does not exists and here I want to put the text into a RadLabel.)
Hi,
I'm trying to create two radio buttons with superscript text on them usch as this
Is this possible ?
I have tried 1.0ms for the radio button text and-1 as a label, both with transparent backgrounds, but when I overlay them the radio button masks the -1 superscript label when it overlaps the radio button. I believe html in RadLabel does not support superscript / subscript either.
How do I acheive this effect?
Regards
Toby