Telerik Forums
UI for WinForms Forum
23 answers
841 views
I'm trying to add a button in the Titlebar, I would like to give it the same aspect than the other buttons but I'm unable to do it, see:

http://i.stack.imgur.com/cH5Zw.png

Notice that my new button has a shiner color than the others and also the size protrudes out the yellowed border.

This is the code that I'm using:
----------------------------------------------------------------------------------------------------------
Imports Telerik.WinControls.UI

Public Class RadForm_TestForm : Inherits RadForm

Public Sub New()

' This call is required by the designer.
InitializeComponent()

' Set the RadForm design.
With Me

.ThemeName = "VisualStudio2012Dark" ' The visual theme.
.FormElement.Border.ForeColor = Color.Gold ' Set the borders color.
.FormElement.Border.Width = 1I ' Set the borders width.
.FormElement.TitleBar.BorderPrimitive.ForeColor = Color.Red
.FormElement.TitleBar.ForeColor = Color.LightGray ' Set the TitleBar text color.
.FormElement.TitleBar.MinimizeButton.Enabled = False

End With

' Create a RadButtonElement.
Dim SystrayButton As New RadButtonElement()
With SystrayButton ' Set the RadForm design.

.Text = "."
.ShowBorder = False
.AutoSize = False

.Size = Me.FormElement.TitleBar.MinimizeButton.Size
' .ButtonFillElement.BackColor = Me.FormElement.TitleBar.MinimizeButton.BackColor

End With

' Add the Button in the TitleBar.
Me.FormElement.TitleBar.Children(2).Children(0).Children.Insert(0, SystrayButton)

End Sub

End Class
----------------------------------------------------------------------------------------------------------
Notice that in the code above this line is disabled:

.ButtonFillElement.BackColor = Me.FormElement.TitleBar.MinimizeButton.BackColor

Because if I change the color in that way, if I put the mouse over the button it does not change the color when it is focused so it replaces the focused state.












I'm trying to add a button in the Titlebar, I would like to
give it the same aspect than the other buttons but I'm unable to do it,
see:



Notice that my new button has a shiner color than the others and also the size protrudes out the yellowed border.

This is the code that I'm using:

Imports Telerik.WinControls.UI

Public Class RadForm_TestForm : Inherits RadForm

Public Sub New()

' This call is required by the designer.
InitializeComponent()

' Set the RadForm design.
With Me

.ThemeName = "VisualStudio2012Dark" ' The visual theme.
.FormElement.Border.ForeColor = Color.Gold ' Set the borders color.
.FormElement.Border.Width = 1I ' Set the borders width.
.FormElement.TitleBar.BorderPrimitive.ForeColor = Color.Red
.FormElement.TitleBar.ForeColor = Color.LightGray ' Set the TitleBar text color.
.FormElement.TitleBar.MinimizeButton.Enabled = False

End With

' Create a RadButtonElement.
Dim SystrayButton As New RadButtonElement()
With SystrayButton ' Set the RadForm design.

.Text = "."
.ShowBorder = False
.AutoSize = False

.Size = Me.FormElement.TitleBar.MinimizeButton.Size
' .ButtonFillElement.BackColor = Me.FormElement.TitleBar.MinimizeButton.BackColor

End With

' Add the Button in the TitleBar.
Me.FormElement.TitleBar.Children(2).Children(0).Children.Insert(0, SystrayButton)

End Sub

End Class

Notice that in the code above this line is disabled:

.ButtonFillElement.BackColor = Me.FormElement.TitleBar.MinimizeButton.BackColor

Because if I change the color in that way, if I put the mouse over the button it does not change the color when it is focused.

Maybe a solution could be applying the same theme of my RadForm on the RadButtonElement?

I've read this: http://www.telerik.com/forums/apply-theme-to-radbuttonelement

...but I really don't understand how to do it, I don't have any 'DefaultStyleBuilder' and I can't find info in telerik about what means that.


PS: Here you can read this question in other webpage: http://stackoverflow.com/questions/25635610/telerik-how-to-properly-add-a-radbuttonelement-in-a-radform-titlebar/25799876?noredirect=1#comment40391390_25799876

I need help to solve this... thanks.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 13 May 2019
1 answer
214 views

Convert radGridView column after binding to a Hyperlink?

 

How can I do this?  When I converted to a radGridView the same type conversion gave errors on compile.

 

With DataGridView control I was able to access a cell and change it to a hyperlink

using very similar code to this:

 

01.void dataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
02.{
03.    foreach (DataGridViewRow r in dataGridView1.Rows)
04.    {
05.        if (System.Uri.IsWellFormedUriString(r.Cells["Contact"].Value.ToString(), UriKind.Absolute))
06.        {
07.            r.Cells["Contact"] = new DataGridViewLinkCell();
08.            // Note that if I want a different link colour for example it must go here
09.            DataGridViewLinkCell c = r.Cells["Contact"] as DataGridViewLinkCell;
10.            c.LinkColor = Color.Green;
11.        }
12.    }
13.}
Dimitar
Telerik team
 answered on 13 May 2019
0 answers
63 views

Hello everyone,

When I design GridViewDecimal Column, I don't want to use automatic data filling. How can I turn it off? Who can help me? Thank you very much.

Specifically as follows: picture_gridview

hong
Top achievements
Rank 1
 asked on 13 May 2019
2 answers
420 views

Hello,

I cannot modify textalignment for a radlabel in designer time. Whichever kind of textalignment I change, it is always fixed in TopLeft. And I cannot change it back any more.

PS. I'm using the latest version of Telerik library. And I've tested in Visual Studio 2017 and Visual Studio 2019.

Thank you by advance.

Kun
Top achievements
Rank 2
 answered on 10 May 2019
5 answers
315 views

Hi,

I am evaluating your WinForms control suite to see if I could use it for a project I'm working on. I'm trying to create a custom editor in a GridView that would allow me to have a searchable ComboBox where the users can add/rename items right from the editor. First I tried to add an element while in edit mode based on an forum thread I saw (I added a TextBox in addition to the combobox) but I cannot get it to allow focus on the textbox in addition to the ComboBox. Is there a better way to achieve having a ComboBox AND TextBox together in the same editor? Or do you have a better idea of how I could achieve the user story of allowing the user to add/rename items from the ComboBox right from the grid without having another form? From what I'm seeing it looks like the GridBaseEditor just allows one EditorElement not two. Any help you could provide would be appreciated.

Thank you for your time.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 May 2019
3 answers
153 views
Is there any way to trigger Expand/collapse events in VirtualGrid programatically?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 10 May 2019
1 answer
60 views

Hellow,my friend

When it comes to financial calculation, decimal should be reserved, and cell rounding is prohibited.

If I set the DecimalPlaces property of the GridViewDecimalColumn to 10, an extra zero will appear when editing the cell, as shown in the figure below.

I feel so ugly. Is there any solution?

Dimitar
Telerik team
 answered on 10 May 2019
4 answers
188 views
Is there a way to get and set the splitter position?
Steve
Top achievements
Rank 1
 answered on 09 May 2019
0 answers
71 views

Hello, I have a wizard used for steps in creating salary for employes. If however I go back from the current page shown in the picture, and change the payout date, the previous date is not removed. (the hosted item)

I have tried this article https://www.telerik.com/forums/radcalendar-specialdays-remove-winforms but without any luck. 

 

Thanks in advance

 

 

Nicklas
Top achievements
Rank 1
 asked on 09 May 2019
1 answer
114 views

I see that there is a ScreenTip associated with the button but it's not functioning for me.  Snippet of code:

 

var coolScreenTip = new RadOffice2007ScreenTipElement();
coolScreenTip.CaptionLabel.Text = wrkItem.GroupTitle;
coolScreenTip.MainTextLabel.Text = string.Format("{0}\n{1}",wrkItem.Title, wrkItem.Description);
coolScreenTip.FooterTextLabel.Text = "Test Footer";
coolScreenTip.FooterVisible = true;
 
var QuickMenuItem = new RadMenuButtonItem(strTitle)
{
//    ToolTipText = wrkItem.Description,
    KeyTip = "quick",
    Tag = wrkItem.OriginId,
    ScreenTip = coolScreenTip
};
QuickMenuItem.Click += quickMenu_Click;
radMenuItemQuick.Items.Add(QuickMenuItem);

 

Hovering over any button does not show the screen tip.  This code seems to work fine for inside of a grid, but there is a "needscreentip" event.

Any help would be appreciated!

 

Dimitar
Telerik team
 answered on 09 May 2019
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
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)
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
Rotator
TrackBar
MessageBox
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ScrollBar
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
ColorBox
Callout
FilterView
PictureBox
VirtualKeyboard
NavigationView
Accessibility
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
ButtonTextBox
FontDropDownList
Licensing
BreadCrumb
Security
LocalizationProvider
Dictionary
Overlay
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
Flyout
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
DateOnlyPicker
TimeOnlyPicker
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?