Telerik Forums
UI for WinForms Forum
4 answers
1.2K+ views

I want to generate the image of BarCode without showing on the WinForm.  How to assign "Code39Extended" to Symbology?

 RadBarcode rBL = new RadBarcode();
 rBL.Symbology = "Code39Extended";

Thanks.

 

Dess | Tech Support Engineer, Principal
Telerik team
 updated answer on 30 Apr 2021
1 answer
127 views

 

Hello,

I'm struggling to get some events to work on a RadListViewElement, which is a child of a custom RadElement, which in turn is inside another custom RadControl. I guess a few lines of code will help to describe this:

Imports Telerik.WinControls
Imports Telerik.WinControls.UI

Public Class xElement
    Inherits RadElement

    Private listElement As RadListViewElement

    Public Sub New()
        'Me.NotifyParentOnMouseInput = True
        'Me.ShouldHandleMouseInput = True
        'Me.Capture = True
        'Me.CaptureOnMouseDown = True
    End Sub

    Protected Overrides Sub OnLoaded()
        MyBase.OnLoaded()

        AddHandler listElement.ItemMouseUp, Sub(s, e)
                                                If e.OriginalEventArgs.Button = MouseButtons.Left Then
                                                    listElement.SelectedItem = e.Item
                                                End If
                                            End Sub
    End Sub

    Protected Overrides Sub CreateChildElements()
        MyBase.CreateChildElements()

        listElement = New RadListViewElement
        With listElement
            '.ShouldHandleMouseInput = True
            '.NotifyParentOnMouseInput = True
            '.Capture = True
            '.CaptureOnMouseDown = True
            .ViewType = ListViewType.ListView 
            .DataSource = New List(Of String)(New String() {"a", "b", "c"})
        End With
        Me.Children.Add(listElement)
    End Sub

End Class
Imports Telerik.WinControls

<ToolboxItem(True)>
Public Class xControl
    Inherits RadControl

    Private element As xElement

    Public Sub New()
        element = New xElement()
        RootElement.Children.Add(element)
    End Sub

End Class

Some remarks on this piece of code:
- The items in listview react to events like mouseEnter/Leave.
- These items can't be selected by using the mouse, the click event does nothing on them, the action needs to be managed manually, which here is done in the OnLoaded() sub.
- The click event works on other elements inside listView, so, for instance, the scrollbar of the item container can be clicked, the list of items can be scrolled.

So, some events work out-of-the-box and some do not, and a certain event works here but not there, so I'm somewhat confused on what's going on. Anyway, it doesn't seem like the way it's supposed to be, and I'm sure the proper solution is a lot less cumbersome than manually capturing each event and then replicating the original behavior.

I guess I'm just missing something about how TPF works, maybe there's some element not initialized correctly, perhaps I need to enable some property. Any suggestions on this?

Thank you

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 30 Apr 2021
1 answer
136 views

How can I find out the selected layout  (list, small icon, etc.) chosen by the user at the point the dialog is closed?

Thanks

Steve

Nadya | Tech Support Engineer
Telerik team
 answered on 28 Apr 2021
7 answers
629 views

Hello

I would need to calculate the height of a grid as it would be if all the rows were visible.

I need this value to change the location of another element just below the grid.
More precisely, the grid and the other component are located within a tablelayoutpanel that has two rows, the top one is of variable height and the second of fixed height.

When the form is resized (or the grid re-loaded), I can have two situations:

1. the grid does not fit in the available space of the first row, in this case I do not need to adjust the position of the second row of the table layoutpanel

2, the grid does not fill the available space of the first row. In this case I need to change the height of the second row in order to have the second element "just" below the grid without having a large white space between the grid and the second element.

I have tried to calculate the grid height as the sum of individual gridrow height but since the gridheight of a non visible row = -1 this does not work.

Therefore I would like to have the height of the grid as if all the rows were visible and the I can proceed with my redimensionning of the layoutpanel.

I am not sure my explanations are clear ..

 

Thanks in advance for any suggestion

Best regards

Pierre-Jean

 

pierre-jean
Top achievements
Rank 1
Veteran
Iron
 answered on 28 Apr 2021
6 answers
131 views

I would like to remove the Group option from the DataFilterAddNodeElement dropdown list when I'm adding to an existing group. Basically I only want to allow adding expressions to groups and prevent nested groups from being created. However, I still want to allow adding groups to the root node, just not to other groups. Is there a way to hide or disable the Group option in this scenario?

Thanks

Ole
Top achievements
Rank 1
 answered on 26 Apr 2021
1 answer
110 views

Hi Team,

   When click or double click in the field and the full number doesn't get highlighted on the RadMaskedEditbox.

 

Video Link : https://ttprivatenew.s3.amazonaws.com/pulse/suganya-gmail/attachments/16655538/TinyTake24-04-2021-01-52-14.mp4

We need to load the Phone number Textbox value as 713-000-0000 ("(###) ###-####") while loading but when i try to enter the value the RadMaskedEditbox value it should allow to type 18 characters ((###) ###-############)

 

Nadya | Tech Support Engineer
Telerik team
 answered on 26 Apr 2021
6 answers
461 views
Hi, I am trying to use RadPictureBox  (Telerik UI for WinForms R1 2021) to  view EMF file. Zoom is working but I can't zoom to cursor or, at least stay at the same area, during zoom both scrollbars are getting max value so the image scrolled to bottom right corner  
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 26 Apr 2021
2 answers
126 views

Hi,

How can I prevent the DragDrop operation in the File Open and File Save dialogs?

Thanks

Steve

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 23 Apr 2021
2 answers
116 views

Hello!

I've got an Unbound RadGridView control that loads without issue.

Each row includes a Hierarchical grid.

 

I control the main grid column header height with this: gridTest.TableElement.TableHeaderHeight = 15

but I have not been able to figure out how to adjust the Hierarchical grid's column header height.

 

Any help you can offer would be appreciated :)

-C

 

 

 

 

 

 

Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 22 Apr 2021
4 answers
673 views
#1
How do I change the appearance of each of these: date of current value, today's date, special days, date under cursor as it moves, etc..  For example, I may want the current value's date to be an outline only, special days to be green with no border, today to be white font on black, etc.?

#2
when I set this.ShowUpDown = true; in a custom control VS can no longer draw the UI of any form that uses the control and when the app is run the next line of code (RadDateTimePickerCalendar calendarBehavior = (this.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar);) returns calendarBehavior as a null value.  Is ShowUpDown deprecated or is this a bug?

#3
I tried to follow this http://www.telerik.com/community/forums/winforms/calendar-and-datetimepicker/disable-future-dates-on-datetimepicker-calender-element.aspx but the disabling only happens when the calendar is initially drawn ... (does not refresh when moving to other months) ... I fixed it by subscribing to the events for <, >, <<, >> buttons ... is this the best approach or is there one event for when the calendar changes?

#4
How do I change the image (from the combobox default to my calendar.png)?
I tried this (that I found on the forums) 

RadDateTimePickerArrowButtonElement button = (RadDateTimePickerArrowButtonElement)this.DateTimePickerElement.ArrowButton.Children[1].Children[1];

((ImagePrimitive)button.Children[4]).Image = ImageLibrary.Calendar;

which failed because the first Children[1] did not have any children resulting in a null reference.

I also tried this which looked obvious ...

this.DateTimePickerElement.ArrowButton.Image = ImageLibrary

.Calendar;
but the appearance of the control did not change.

#5
When my custom control sets

this.Format = DateTimePickerFormat.Custom;

this.CustomFormat = "MM/dd/yyyy - ddd";

these properties are ignored and must be explicitly set for each control where implemented.  Other values like

this.NullText are inherited from my controls as expected.

 

Ras Ran
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 21 Apr 2021
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
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
CheckedDropDownList
ProgressBar
TrackBar
MessageBox
Rotator
SpinEditor
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?