Telerik Forums
UI for WinForms Forum
1 answer
76 views

I'm using the  example for the radfontdropdownlist control to attempt to set the font for the radsyntaxeditor.  So far, I haven't had any luck changing it.    

Here is an example:

I attempted to set editor.SyntaxEditorElement.Font = font as well, but while that doesn't blow up, it doesn't seem to change anything either.

Here's the full code for this event:

    Private Sub fontDropdown_SelectedFontChanged(sender As Object, e As EventArgs) Handles fontDropdown.SelectedFontChanged
        Dim editor As RadSyntaxEditor = GetActiveEditor()
        If IsNothing(editor) Then Exit Sub
        Dim ff As FontFamily = New FontFamily(fontDropdown.SelectedFont)
        If ff.IsStyleAvailable(FontStyle.Regular) Then
            Dim font As Font = New Font(ff.Name, 10, FontStyle.Regular)
            editor.SyntaxEditorElement.EditorFontFamily = font.FontFamily
        Else
            For Each style As FontStyle In [Enum].GetValues(GetType(FontStyle))
                If ff.IsStyleAvailable(style) Then
                    Dim font As Font = New Font(ff.Name, 10, style)
                    editor.Font = font
                    Exit For
                End If
            Next
        End If

    End Sub

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 22 Mar 2023
3 answers
94 views

How can I change the font of DropDownList items?

How can I change focused color of DropDownList?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 18 Apr 2016
5 answers
489 views
Hi,
In traditional WinForms all controls on a form inherit their Font property from it's parent form or container by default.
Apparently, this is not the case with Telerik WinForms. 

When there are many controls on a form, it becomes very uncomfortable. Especially when dealing with DropDownList controls.
Not only you have to set control's Font property to the font you desire (which only sets the font of the selected text),
you also have to handle the VisualListItemFormatting event and set args.VisualItem.Font programmatically to set the font of drop down items.

Am i missing something simple or is it just the way it is with Telerik?

Thanks ahead,
Uri
Hristo
Telerik team
 answered on 24 Jul 2015
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
Label
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
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
Iron
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
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?