Telerik Forums
UI for WinForms Forum
2 answers
273 views

Hi,

Is it possible to get an example of how to to create a custom TextHighlightTag? To try and recreate what the 'Find All' achieves in the search dialog.

It's the only TaggerBase I'm having trouble getting working. I've literally copied the source code from TextSearchHighlightTagger.cs but no matter what when I try to use UpdateSearchWord it results in an exception 'Object reference not set to an instance of an object.'

If I don't register a custom tagger and just use:

syntaxEditor1.SyntaxEditorElement.HighlightAllMatches("Test");

It does exactly what I want to do, only that I can't seem to set the TextFormatDefinition.

What I'm hoping to achieve is to have a text field that controls what is highlighted. Custom would be ideal as I could have more than one then but for my intended purpose I'd be happy just to be able to configure the default colors.

Thanks in advanced!

Regards

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 May 2022
2 answers
167 views

I am using a default RadListView control, and wish to use custom list items. Following the directions here, I wrote the following class.

using System;
using System.Drawing;
using Telerik.WinControls.UI;
using Telerik.WinControls.Layouts;

namespace CustomListItemTest
{
    class SampleVisualItem : SimpleListViewVisualItem
    {
        private LightVisualElement sampleNumberField;
        private StackLayoutPanel stackPanel;

        public string sampleNumber = string.Empty;

        protected override void CreateChildElements()
        {
            base.CreateChildElements();

            stackPanel = new StackLayoutPanel
            {
                Orientation = System.Windows.Forms.Orientation.Horizontal,
                EqualChildrenWidth = true,
                ShouldHandleMouseInput = false,
                NotifyParentOnMouseInput = true
            };

            sampleNumberField = new LightVisualElement
            {
                StretchHorizontally = true,
                MinSize = new Size(50, 0),                
                ShouldHandleMouseInput = false,
                NotifyParentOnMouseInput = true                
            };
            stackPanel.Children.Add(sampleNumberField);

            Children.Add(stackPanel);
        }

        protected override void SynchronizeProperties()
        {
            base.SynchronizeProperties();

            Text = "";            
            sampleNumberField.Text = sampleNumber;
        }

        protected override Type ThemeEffectiveType
        {
            get
            {
                return typeof(SimpleListViewVisualItem);
            }

        }
    }
}

 

On the form I handle these events.

private void RadForm1_Load(object sender, EventArgs e)
        {
            ListViewDataItem newItem = new ListViewDataItem();
            newItem.Key = "sampleNumber";
            newItem.Value = "123434";
            SampleList.Items.Add(newItem);
        }

        private void SampleList_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
        {
            if (SampleList.ViewType == ListViewType.ListView)
            {
                e.VisualItem = new SampleVisualItem();
            }
        }

 

However the added item does not appear. If I click around enough and move the mouse off screen, the item does appear (so it does exist), but if I click off-screen again it's gone.

What am I doing wrong?

 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 09 May 2022
1 answer
115 views

I've searched and found a few suggestions on how to do this, but none of them seem to work for me.  

Here's what I've tried in the CellFormatting event:

        e.CellElement.DrawBorder = False
        e.CellElement.BorderWidth = 0
        e.CellElement.BorderBottomWidth = 0
        e.CellElement.BorderTopWidth = 0
        e.CellElement.BorderLeftWidth = 0
        e.CellElement.BorderRightWidth = 0

and I'm still seeing a horizontal line between rows:

Clearly I'm not doing the right thing, can someone please point me in the right direction?  

Thanks!

 

Dinko | Tech Support Engineer
Telerik team
 answered on 09 May 2022
2 answers
449 views
after the data source for the grid is being updated the columns adjusts them widths perfectly by using "BestFitColumns(BestFitColumnMode.DisplayedCells)" ,but what i wan to acheive next is to resize the hole grid based on the new size of the columns , i have set the autosize property to true and also tried AutoSizeColumnsMode = Telerik.WinControls.UI.GridViewAutoSizeColumnsMode.Fill but that stops the columns to adjust based on the text inside , can't i adjust both together columns and hole grid width ?? 
Dinko | Tech Support Engineer
Telerik team
 answered on 09 May 2022
1 answer
246 views

            txt_DB_Code.Text = lb.clsGenerator.get_table_code(cboTabels.Text, dtColumns);
            byte[] byteArray = Encoding.ASCII.GetBytes(txt_DB_Code.Text);
            MemoryStream stream = new MemoryStream(byteArray);
            txt_DB_Code_syntax_editor.Document = stream;

 

 

 txt_DB_Code.Text value is :

see attached image

Regards

Kobus

Dinko | Tech Support Engineer
Telerik team
 answered on 06 May 2022
3 answers
231 views

Hi

I have a problem updating the RadMultiColumnComboBox header when I retrieve which rows in the data grid are to be selected from the database.
the lines are selected with the lines that I set to true, but they are not put in the combo box header until I use the drop down function. Can this be solved or what am I doing wrong.

Private Sub FrmTestTelerik_Load(sender As Object, e As EventArgs) Handles Me.Load
        SetCheckStateToActvityTypes()
    End Sub

    Private Sub SetCheckStateToActvityTypes()
        For i As Integer = 0 To RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows.Count - 1
            Dim item As Object = RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i)
            Dim id As Integer = item.Cells(0).value
            If id = GetSelectetActivityTypeIDFromDB(id) Then
                RadMultiColumnComboBox1.MultiColumnComboBoxElement.Rows(i).Tag = Boolean.TrueString
                RadMultiColumnComboBox1.Refresh()

            End If
        Next
    End Sub

Best Regard

Stefan HÃ¥kansson Volvo Cars Sweden

 

Dinko | Tech Support Engineer
Telerik team
 answered on 05 May 2022
1 answer
126 views

hi ,I am using RadGridview and wanted to show the Columns in a vertical way and the rows horizontaly  is this possible ,if so can anyone please guide me .

thanks,

Med. 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 05 May 2022
0 answers
141 views

Hello all!  It's been a while :)

I'm working with your radDock control to give my Users a more graceful way of managing their visual data and so far it's working out quite well with one notable exception:

When a User has multiple DocumentWindow docked, the look and feel is fine (VS2012LightTheme) and looks like the image in DockSample1.  However, this is not the intended layout - it's merely the default for when new windows are opened.  Once opened my User move the windows to their desired locations as seen in image, DockSample2.  This is where the trouble is.

1) Which document has focus?  Only those with outstanding eyes can tell.

DockSample3 shows the effect I'm going for.  At a glance, this is only touching the BackColor of the TabStripItem but in fact I need to adjust all of the following:

BTW - I am GUESSING that this is a TabStripItem!  Please forgive me if i got this one wrong, and correct as needed :)

TabStripItem BackColor and Font Forecolor when Tab is ActiveWindow, Mouse Over and Not ActiveWindow

I did find a number of possible solutions in the Forums but most are for much older versions of Telerik UI for Winforms and did not translate.

Any help you can provide would be very helpful.

Kindest regards,

Curtis

 

 

 

 

 

 

Curtis
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 04 May 2022
2 answers
243 views

Hello.
In Winforms RadgridView, I'm trying to draw a border on the right side of the cell.
If I set RadGrid theme to "VisualStudio2022Light", the frame is not displayed. Other themes (not all) work good.

    Private Sub RadGridView1_CellFormatting(sender As Object, e As CellFormattingEventArgs) Handles RadGridView1.CellFormatting
        If e.CellElement.IsSelected Then
            e.CellElement.DrawBorder = True
            e.CellElement.BorderBoxStyle = Telerik.WinControls.BorderBoxStyle.FourBorders
            e.CellElement.BorderRightWidth = 1
            e.CellElement.BorderRightColor = Color.Red
        Else
            e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderBoxStyleProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderRightWidthProperty, ValueResetFlags.Local)
            e.CellElement.ResetValue(LightVisualElement.BorderRightColorProperty, ValueResetFlags.Local)
        End If

How can I solve the problem without using VSB.

Regards

Jack

Jacek
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 04 May 2022
0 answers
284 views

Greetings,

With the given solution in this link it is possible to zip and unzip multiple files with a password, but I also need to zip and unzip folders with files in them. Considering there are folders and files in a single directory, how is it possible to zip them all with the same hierarchy of files and folders? I tested the solution in a scenario that there are folders in a directory and the result was taking out all files out of their corresponding folders and putting them all in one single zip file.

George C.
Top achievements
Rank 2
Iron
Veteran
 asked on 02 May 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
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
Diagram, DiagramRibbonBar, DiagramToolBox
GanttView
Panorama
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
VirtualGrid
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
CheckedDropDownList
TrackBar
MessageBox
Rotator
SpinEditor
StatusStrip
CheckedListBox
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
DataEntry
ScrollablePanel
ScrollBar
WaitingBar
ImageEditor
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
FilterView
Accessibility
VirtualKeyboard
NavigationView
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BarcodeView
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
DateOnlyPicker
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?