Telerik Forums
UI for WinForms Forum
0 answers
86 views

Hi,

I'm creating password with track bar.

I do not know how to write code (TrackBar.Value):

 

Please check my code:

01.int PassLength = 0;
02.static string Shuffle(string input)
03.{
04.    var q = from c in input.ToCharArray()
05.            orderby Guid.NewGuid()
06.            select c;
07.    string s = string.Empty;
08.    foreach (var r in q)
09.        s += r;
10.    return s;
11.}
12.private void CreatePassword_Click(object sender, EventArgs e)
13.{
14.    txt_CreatePass.Text = "";
15.    string text = "aAbBcCdDeEfFgGhHiIjJhHkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ01234567890123456789{,;:!*$@-_=^[}{,;:!*$@-_=^[}";
16.    text = Shuffle(text); //shuffle the above symbols using shuffle() method.
17.    text = text.Remove(PassLength); //cut the string size according to the chosen trackbar value.
18.    txt_CreatePass.Text = text;
19.}
20. 
21.private void TrackBar_ValueChanged(object sender, EventArgs e)
22.{
23. 
24.    this.TrackBarCreatePass.Value = Convert.ToInt32(+1);
25.    lbl_Count.Text = PassLength.ToString();
26. 
27.    //lbl_Count.Text = TrackBarCreatePass.Value.ToString();
28.    //PassLength = this.TrackBarCreatePass.Value;
29.}
30. 
31.private void TrackBar1_CreatePass_ValueChanged(object sender, EventArgs e)
32.{
33.    PassLength = TrackBar1_CreatePass.Value + 1; //trackbar value starts from 0, so I add +1 to make it understandable;
34.    lbl_Count.Text = PassLength.ToString();
35.}
saeid
Top achievements
Rank 1
 asked on 19 Feb 2017
1 answer
176 views

Is there any way to apply a StyleRepository object to a control? I know I can do something like:

         Theme currenTheme = ThemeRepository.FindTheme(ThemeResolutionService.ApplicationThemeName);
         StyleRepository repositoryFromTheme = currenTheme.FindRepository("DisabledForeColor");
         PropertySetting styleForeColor = repositoryFromTheme.FindSetting("ForeColor");
         Color colorToSet = (Color)styleForeColor.Value;
         myTextBox.Forecolor = colorToSet;

However, if I have multiple properties to set (say, multiple colors and maybe some transparency or a background image or something), this can get a bit tedious and it lacks flexibility. So, what I'd like to do is just take the StyleRepository object and apply it directly to the control. Alternately, I'd be fine with looping through the settings collection and applying each of those individually so long as I didn't have to hard code the names of the PropertySettings into my code. Something like:

         foreach (PropertySetting currentPropertySetting in repositoryObjectFromTheme.Settings)
         {
            genericRadControl.SOMETHING = currentPropertySetting;
         }

would work for me fine as well.

Any suggestions?

 

Hristo
Telerik team
 answered on 17 Feb 2017
2 answers
634 views
Hi, I am working with the Rich Text Editor Ribbon Bar in WinForms.  I want to hide the entire File menu options.  How can this be done?
Bill
Top achievements
Rank 1
 answered on 17 Feb 2017
4 answers
501 views
Hello,

Since last version, how could I change column index, because now it seems that "Telerik.WinControls.UI.GridViewColumn.Index" is read only ?

Thanks.
Hristo
Telerik team
 answered on 17 Feb 2017
5 answers
126 views

Hello,

There is a bug in gridview printiing with mode landscape only

with this gridview :

http://creiler.free.fr/window_gridview.jpg

My PrintStyle :

 With oStyle

                .FitWidthMode = PrintFitWidthMode.NoFitCentered
                .PrintGrouping = False
                .PrintSummaries = True
                .PrintHeaderOnEachPage = True
                .PrintHiddenColumns = False
                .PrintHierarchy = True
                .PrintAllPages = True
                .HierarchyIndent = 0
                .CellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                .HeaderCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Regular)
                .SummaryCellFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
                .GroupRowFont = New System.Drawing.Font("Arial", 8, FontStyle.Bold)
            End With​

 

normal :

http://creiler.free.fr/gridview1.jpg

landscape :

http://creiler.free.fr/gridview2.jpg​​

Summary cells are shifting 
Hristo
Telerik team
 answered on 16 Feb 2017
5 answers
408 views
Hi,

Is there some way to get the underlying datasource record when hovering over a cell in the RadGridView?
If not, is there some way to get all cellvalues of the row of the RadGridViewwhere where I'm hovering over?

Reason, I display a RadOffice2007ScreenTipElement when hovering over some cell in the RadGridView and I would like to display some information in there.
For this I need to get to that data BUT I do not want to select that row!!!
The row that was/is selected must stay selected!!

regards
Didier
Dimitar
Telerik team
 answered on 16 Feb 2017
2 answers
166 views

Hi, 

I have to add a ContextMenu to my MultiColumnComboBox. I already added a Winforms ContextMenuStrip and also set the ContextMenu Property. 

Now when I click on my dropDownButton of the ComboBox the right ContextMenu is shown but if I click in the middle of the textboxelement of the Combobox I get another one I do not want. Setting the ContextMenu of the textboxelement doesnt change that behaviour. 

THIS-OBJECT:MultiColumnComboBoxElement:TextBoxElement:TextBoxItem:HostedControl:ContextMenuStrip = THIS-OBJECT:contextMenuStripMain

Does anyone have an idea how to solve this ?

 

Sincerely,

Dominik

Dominik
Top achievements
Rank 1
 answered on 16 Feb 2017
23 answers
263 views
I have a 3 level hierarchical grid and I am getting the following error when I try to edit an expanded child row:

System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Telerik.WinControls.GridView"
StackTrace:
at Telerik.WinControls.UI.GridViewEditManager.InitializeEditor(IInputEditor activeEditor)
at Telerik.WinControls.UI.GridViewEditManager.BeginEdit()
at Telerik.WinControls.UI.GridRowBehavior.OnMouseUpLeft(MouseEventArgs e)
at Telerik.WinControls.UI.GridRowBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.BaseGridBehavior.OnMouseUp(MouseEventArgs e)
at Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at CU_Estimating_v2.Program.Main() in C:\Documents and Settings\APahlka\My Documents\Visual Studio 2008\Projects\CU_Estimating_v2\CU_Estimating_v2\Program.cs:line 23
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:

If the row is not expanded, then I don't get the error. The grid looks something like this when the error occurs:
- Parent
  - Child (trying to edit and get’s error) 
     Grandchild

I don’t get it when the child row is not expanded like this:
- Parent
+ Child (trying to edit and no error)

I'm trying to duplicate it on a smaller project, but I have not been able to yet.

Do you have any suggestions to try?

Thank you,
Aaron
Dimitar
Telerik team
 answered on 15 Feb 2017
7 answers
573 views

Hello

- Are there means to style hyperlinks in a html formatted RadLabel similar to css (.hover, .visited etc.)? couldn't find anything in the docs.

- When using a RadLabel with a hyperlink on a Rad Doc Document, the link seems to stay in .active mode after the webpage has opened. When I reopen the document the link goes into .visited style (as expected). I'd like it to revert to initial state or go into .visited state.

Regards

Erwin

Dimitar
Telerik team
 answered on 15 Feb 2017
9 answers
1.6K+ views

How do you remove/hide the Add or Remove Buttons/Customize item from the commandbar/strips? I didn't the Add or Remove Programs Button directly mentioned or named in the documentation so I am not sure if I am overlooking it.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Feb 2017
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)
Form
Chart (obsolete as of Q1 2013)
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
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
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
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
Styling
Barcode
PopupEditor
RibbonForm
TaskBoard
Callout
NavigationView
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Security
LocalizationProvider
Dictionary
SplashScreen
Overlay
Flyout
Separator
SparkLine
TreeMap
StepProgressBar
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?