Telerik Forums
UI for WinForms Forum
1 answer
9 views

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?

 

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Apr 2024
4 answers
314 views
Hi,

     We are using the RadLabel control in part of chat application. I used the RadLabel and keep the AutoSize property True. When I type more contents in that label, the label keep grow in horizontal and not able to view all the entered contents.
     I would like to know how to automatically increase the height of the radlabel baed on the content.

Thanks,

Jeen
Jarrad
Top achievements
Rank 1
Iron
 answered on 21 Feb 2024
3 answers
31 views

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

 

Nadya | Tech Support Engineer
Telerik team
 answered on 11 Jan 2024
1 answer
43 views

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!

Dinko | Tech Support Engineer
Telerik team
 answered on 31 Oct 2023
2 answers
55 views

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

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Sep 2023
2 answers
41 views

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.

tar
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 11 Sep 2023
3 answers
89 views

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

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 24 Apr 2023
2 answers
215 views

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

 

Dess | Tech Support Engineer, Principal
Telerik team
 updated answer on 28 Feb 2023
1 answer
66 views

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.)

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 11 Jan 2023
1 answer
246 views

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

 

 

 

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 Nov 2022
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?