Telerik Forums
UI for WinForms Forum
1 answer
51 views

Hi,

When the Chinese input method is used, a Chinese word is generated after the space key is pressed. For example, if you enter j, i, a, n, c, h, a, and then press space, you will get "检查". I want to filter "检查" as a filter word. What should I do? Thanks.

Dinko | Tech Support Engineer
Telerik team
 answered on 12 Jul 2023
1 answer
49 views
I have a custom class of TokenizedTextBlockElement that is displaying 3 different color 'styles' for token - green, yellow and red (backgrounds are #E3EDE1, #FCF8E3, #F2DEDE respectively), so the default RemoveButton's image is not visible enough.

I want to change the "X" image (RemoveButton) and it's states (default,  MouseOver, MouseDown, Disabled). It can be either by creating 3 different classes in Telerik's VisualStyleBuilder, or inside c# project's code but they need to be #1A3B17, #665A1F, #661F1F. How do I fix this issue?

In attachment I am presenting my current design issue (ignore the red exclamation point icon - it is a temporary icon to be replaced with more appropriate icons).
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Mar 2023
4 answers
55 views

I need AutoComplete functionality for RadTextBoxControl that will allow me to identify the object selected by the user.


Public Class Person
    Public Property GuidPerson As Guid
    Public Property FirstName As String
    Public Property LastName As String
    Public ReadOnly Property FullName As String
        Get
            Return String.Format("{0} {1}", FirstName, LastName)
        End Get
    End Property
    Public Sub New(fName As String, lname As String)
        GuidPerson = Guid.NewGuid
        FirstName = fName
        LastName = lname
    End Sub
End Class

Public Class RadForm4
    Private listPerson As New List(Of Person)
    Public Sub New()
        InitializeComponent()

        listPerson.Add(New Person("John", "Snow"))
        listPerson.Add(New Person("Arya", "Stark"))
        listPerson.Add(New Person("Brandon", "Stark"))
        listPerson.Add(New Person("Catelyn", "Stark"))

        RadTextBoxControl1.AutoCompleteMode = AutoCompleteMode.Suggest
        RadTextBoxControl1.AutoCompleteDataSource = listPerson
        RadTextBoxControl1.AutoCompleteDisplayMember = "FullName"

    End Sub
    Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
        'HOW TAKE 'GuidPerson' from selected item in RadTextBoxControl1
    End Sub
End Class

How to capture a user-selected object?

For example, in RadDropDownList I would do it like this:

Dim searchValue As Person = TryCast(RadDropDownList1.SelectedItem.DataBoundItem, Person)

I don't want to use RadAutoCompleteBox because I want to display the results text and not tokens

Regards

Jack


 

 

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 05 Oct 2022
1 answer
45 views

Hello, when my application adds items to the auto complete box pragmatically I turn them red. I wish to hide the X button so the user cannot remove them. Is this possible? I noticed there is a ShowRemoveButton property on the control but that seems like it is for all tokens?  Here is some of my code. Thank you for the assistance. 

Private Sub AddToken(ByVal ac As RadAutoCompleteBox, ByVal email As String)

        Dim result As EmailTokenObject = AllEmails.Find(Function(o) o.Email.ToLower = email.ToLower)
        If result IsNot Nothing Then
            Dim flag = False 'search for pre-existing items to make sure we don't add them double 

            For Each item As RadTokenizedTextItem In ac.Items
                If item.Value.ToString.ToLower = email.ToLower Then
                    flag = True
                End If
                Exit For
            Next
            If flag = False Then
                'this has to be called BEFORE we add the item to the textbox 
                PrePopulatedEmails.Add(result.Email) 'add to the prepopulated emails so we can color it in red and remove the ability to remove the item 
                'add the item 
                ac.AppendText(result.Name & ";")
            End If
        End If
    End Sub

    Private Sub acWatchlist_TokenValidating(sender As Object, e As TokenValidatingEventArgs) Handles acWatchlist.TokenValidating
        If acWatchlist.Text.Contains(e.Text) Then
            e.IsValidToken = False
        End If
    End Sub

    Private Sub acWatchlist_TextBlockFormatting(sender As Object, e As TextBlockFormattingEventArgs) Handles acWatchlist.TextBlockFormatting
        Dim token As TokenizedTextBlockElement = TryCast(e.TextBlock, TokenizedTextBlockElement)
        If token IsNot Nothing AndAlso PrePopulatedEmails.Contains(token.Item.Value, StringComparer.OrdinalIgnoreCase) Then
            token.GradientStyle = GradientStyles.Solid
            token.BackColor = Color.Red
        End If
    End Sub
Dinko | Tech Support Engineer
Telerik team
 answered on 05 Apr 2022
1 answer
123 views

Hi, I made my own inherited version of RadDropDownList that uses own inherited version of RadAutoCompleteBoxElement for a TextBoxElement (I wanted tokenized text items). I also got my own custom arrow that inherits RadArrowButtonElement, because I do not use the DataSource at all (only Suggest items popup is shown by this custom arrow).
This control works fine if it is used in Designer of the regular form, but when created dynamically the AutoCompleteSuggestHelper.DropDownList.Popup.Click() event does not fire (sidenote: the event AutoCompleteSuggestHelper.DropDownList.KeyDown() event works).

When the control is not created in code behind it is working completely fine. Any suggestions on how to fix it?

Dinko | Tech Support Engineer
Telerik team
 answered on 30 Nov 2021
1 answer
95 views
I'm just comparing the Autocomplete Features of AutoCompleteBox and TextBoxControl.

Is the Tokenization of multiple Items the Key Feature of AutoCompleteBox ? Or could it behave/look like a normal TextBox also.

I found from your Demos, the AutocompleteBox will, if you type "Jon", find an item like "Sebastian Jonnson".
TextBoxControl doesn't . It only finds strings, who starts with the typed Sequence, not contain a sequence.

Is this general behaviour, or are there settings to control how a match is made ?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Jul 2021
1 answer
420 views

So I use the RadAutoCompleteBox to list many options a user can pick that are then added to another textbox.

So once they select it, I take that "Token" and copy it to a "Selected Box".

How would I go about Removing the token after I have copied it in the token validating event.

 

Thanks

 

Rog

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 07 Jul 2021
2 answers
217 views

I have a RadAutoCompleteBox working as expected allowing user to type and pick an item from the list.

The token is then shown in the Textbox as expected.

 

Would like to have a way when they type again and pick another item, to then remove the 1st and only show the 2nd item.

Tried the  radautocompletebox.Text = "" but received some error.  It would be nice to have a property stating (Multiple Tokens (true/false).

 

Maybe there is a programmatically way to click the X in the token to remove it before adding the 2nd token?

 

 

 

 

Nadya | Tech Support Engineer
Telerik team
 answered on 23 Jun 2021
2 answers
78 views

Hi, just a question, it is feasible to use a custom tokenizer for the autocompletebox in order to compose the text blocks?

My tokenizer currently supports a vast variety of "quoted" parts, escape sequences and separators thus would be difficult to use just separators, because if separator is , then the quoted text "Hello, World", will be considered 2 blocks instead of 1.

Best Regards

Andrea

Nadya | Tech Support Engineer
Telerik team
 answered on 18 Jun 2021
2 answers
69 views

I want to execute some code when a user types and then uses the Mouse to click on an item in the list.  

I will need to access the item selected.

 

I am having a hard time to find the correct event to capture this.

 

Thanks.

Nadya | Tech Support Engineer
Telerik team
 answered on 12 Mar 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
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
Menu
RichTextEditor
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)
Label
VirtualGrid
Spreadsheet
ContextMenu
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
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
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
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?