Telerik Forums
UI for WinForms Forum
0 answers
240 views
Hi,

I cannot figure out how to display an image on the ToolWindow tab. This does not display the image on the tool window :

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Windows.Forms;  
using Telerik.WinControls.UI;  
using Telerik.WinControls.UI.Docking;  
using System.Drawing;  
 
namespace toolWindowTest  
{  
    static class Program  
    {  
        /// <summary>  
        /// Point d'entrĂ©e principal de l'application.  
        /// </summary>  
        [STAThread]  
        static void Main()  
        {  
            Application.EnableVisualStyles();  
            Application.SetCompatibleTextRenderingDefault(false);  
            Application.Run(new MainForm());  
        }  
    }  
 
    public partial class MainForm : RadForm {  
 
        public MainForm() {  
            InitializeComponent();  
            IsMdiContainer = true;  
            radDock.AutoDetectMdiChildren = true;  
        }  
 
        Bitmap bitmap;  
        protected override void OnCreateControl() {  
            base.OnCreateControl();  
            bitmap = new Bitmap(16, 16);  
            DrawToBitmap(bitmap, new Rectangle(0, 0, 16, 16));  
            Clipboard.SetImage(bitmap);  
        }  
 
        private void radButton_Click(object sender, EventArgs e) {  
            ToolWindow toolWindow = new ToolWindow();  
            toolWindow.Image = bitmap;  
            radDock.DockControl(new ToolWindow(), DockPosition.Right, DockType.ToolWindow);  
        }  
 
    }  
    partial class MainForm {  
        /// <summary>  
        /// Required designer variable.  
        /// </summary>  
        private System.ComponentModel.IContainer components = null;  
 
        /// <summary>  
        /// Clean up any resources being used.  
        /// </summary>  
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>  
        protected override void Dispose(bool disposing) {  
            if (disposing && (components != null)) {  
                components.Dispose();  
            }  
            base.Dispose(disposing);  
        }  
 
        private void InitializeComponent() {  
            this.radDock = new Telerik.WinControls.UI.Docking.RadDock();  
            this.documentContainer1 = new Telerik.WinControls.UI.Docking.DocumentContainer();  
            this.radPanel = new Telerik.WinControls.UI.RadPanel();  
            this.radButton = new Telerik.WinControls.UI.RadButton();  
            ((System.ComponentModel.ISupportInitialize)(this.radDock)).BeginInit();  
            this.radDock.SuspendLayout();  
            ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radPanel)).BeginInit();  
            this.radPanel.SuspendLayout();  
            ((System.ComponentModel.ISupportInitialize)(this.radButton)).BeginInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();  
            this.SuspendLayout();  
            //   
            // radDock  
            //   
            this.radDock.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));  
            this.radDock.Controls.Add(this.documentContainer1);  
            this.radDock.Dock = System.Windows.Forms.DockStyle.Fill;  
            this.radDock.DocumentManager.DocumentInsertOrder = Telerik.WinControls.UI.Docking.DockWindowInsertOrder.InFront;  
            this.radDock.Location = new System.Drawing.Point(0, 0);  
            this.radDock.MainDocumentContainer = this.documentContainer1;  
            this.radDock.Name = "radDock";  
            this.radDock.Size = new System.Drawing.Size(284, 201);  
            this.radDock.TabIndex = 0;  
            this.radDock.TabStop = false;  
            this.radDock.Text = "radDock";  
            //   
            // documentContainer1  
            //   
            this.documentContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(191)))), ((int)(((byte)(219)))), ((int)(((byte)(254)))));  
            this.documentContainer1.Location = new System.Drawing.Point(0, 0);  
            this.documentContainer1.Name = "documentContainer1";  
            this.documentContainer1.Size = new System.Drawing.Size(284, 201);  
            this.documentContainer1.SizeInfo.SizeMode = Telerik.WinControls.UI.Docking.SplitPanelSizeMode.Fill;  
            this.documentContainer1.TabIndex = 0;  
            this.documentContainer1.TabStop = false;  
            //   
            // radPanel  
            //   
            this.radPanel.Controls.Add(this.radButton);  
            this.radPanel.Dock = System.Windows.Forms.DockStyle.Bottom;  
            this.radPanel.Location = new System.Drawing.Point(0, 201);  
            this.radPanel.Name = "radPanel";  
            this.radPanel.Size = new System.Drawing.Size(284, 30);  
            this.radPanel.TabIndex = 1;  
            //   
            // radButton  
            //   
            this.radButton.AllowShowFocusCues = true;  
            this.radButton.Location = new System.Drawing.Point(3, 3);  
            this.radButton.Name = "radButton";  
            this.radButton.Size = new System.Drawing.Size(75, 23);  
            this.radButton.TabIndex = 0;  
            this.radButton.Text = "ToolWindow";  
            this.radButton.Click += new System.EventHandler(this.radButton_Click);  
            //   
            // MainForm  
            //   
            this.ClientSize = new System.Drawing.Size(284, 231);  
            this.Controls.Add(this.radDock);  
            this.Controls.Add(this.radPanel);  
            this.Name = "MainForm";  
            //   
            //   
            //   
            this.RootElement.ApplyShapeToControl = true;  
            ((System.ComponentModel.ISupportInitialize)(this.radDock)).EndInit();  
            this.radDock.ResumeLayout(false);  
            ((System.ComponentModel.ISupportInitialize)(this.documentContainer1)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this.radPanel)).EndInit();  
            this.radPanel.ResumeLayout(false);  
            ((System.ComponentModel.ISupportInitialize)(this.radButton)).EndInit();  
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();  
            this.ResumeLayout(false);  
 
        }  
 
        private Telerik.WinControls.UI.Docking.RadDock radDock;  
        private Telerik.WinControls.UI.Docking.DocumentContainer documentContainer1;  
        private Telerik.WinControls.UI.RadPanel radPanel;  
        private Telerik.WinControls.UI.RadButton radButton;  
    }  
    class ToolWindow : Telerik.WinControls.UI.Docking.ToolWindow {  
 
        public ToolWindow() {  
            Text = "No image...";  
        }  
 
    }  
}  
 

Thanks.
jpl
Top achievements
Rank 1
 asked on 19 Oct 2009
5 answers
268 views

Hello,

I have several custom width columns in my RadGrid and when I click in a cell that is partially displayed the grid horizontally auto scrolls to bring the entire column into view.  This functionality is great in most cases but when the column contains buttons it causes undesired results. 

IE: Cell contains several buttons but the entire cell isn’t visible within the grid.  When the user clicks the first button the grid auto scrolls, bringing the column into view, but the button click event that fires is for one of the hidden buttons instead of the button clicked.  We think this is happening because the auto scrolling fires before the click event and since the mouse cursor in now on a new button after the scrolling it fires that event instead of first clicked button.

One of two solutions will work for me.

1.  Either suppress the auto horizontal scrolling so the column doesn’t shift into view.

Or

2.  Make sure the proper button click event fires.

How do I make either of these happen?

Regards,
Mike

Jack
Telerik team
 answered on 19 Oct 2009
3 answers
227 views
I am trying to setup the charts so that only the plot area is shown and the chart has no border.  I can't seem to find the correct border property.  There is a border property on the chart object itself that is set to false.  Is the chart border coming from the skin?

Thank you.
Ves
Telerik team
 answered on 19 Oct 2009
5 answers
370 views
Dear friends,

I have a read only RadGridView with several columns. One of those columns is a date, and i want to change the backcolor of the rows that have the date smaller than today's data.

Can you help me?

Thanks in advance.
Tiago
Top achievements
Rank 2
 answered on 19 Oct 2009
2 answers
177 views

I’m developing a c# win app using RadGrid. I would preferably like to be able to use the grid property builder in design time to configure columns, dropdowns etc. On the other hand I would like to work with business objects (using EntitySpaces or similar) to access the data in SQL Server and later implement remoting or similar technologies to migrate to a true n-tier client server app. Anyone having some suggestion regarding an architecture that makes it quick and easy to build the app using RadGrids, but enough ‘future safe’ and object oriented to work in a business application?

Could Microsoft entity framework and Linq to Objects be the solution?


Regards,

Erik

 

Nick
Telerik team
 answered on 19 Oct 2009
1 answer
135 views
Why I can not find any ColorPicker  (similar to Office)?  any where?
Nick
Telerik team
 answered on 19 Oct 2009
3 answers
185 views
Hello,

I've got a couple questions. The first is related to a ScreenTipNeeded Event Handler that I've programmatically added to all of my controls. Essentially, I'm wondering how I can determine what control has invoked the handler using the sender or eventargs variables. In my attempt below, the o variable is null...

        void AllControls_ScreenTipNeeded(object sender, ScreenTipNeededEventArgs e) 
        { 
            RadOffice2007ScreenTipElement screenTip = new RadOffice2007ScreenTipElement(); 
            Control o = sender as Control; 
            string sHelp = "This is help text for " + o.Name; 
            screenTip.CaptionLabel.Text = string.Empty; 
            screenTip.MainTextLabel.Text = sHelp; 
            e.Item.ScreenTip = screenTip; 
        } 

Second, as you may have guessed, the purpose of this is to provide help text for each of my controls on the screen. I've come up with this method of using the screentips, but I was wondering if there was a better or more standardized way for achieving this sort of thing? 
Thanks!
Jeremy
Nick
Telerik team
 answered on 19 Oct 2009
2 answers
150 views
Hi,

I use a RadribbonForm as a mybase.
When I push one button Radribbonform changed to maximize dialog, and it will be topmost and have no button.

For returning normal dialog, I want to use keydown event(Escape key). However it dosen't work.

Can I get any sample source or example key event on the radribbonform?

Thanks, 
Martin Vasilev
Telerik team
 answered on 19 Oct 2009
4 answers
379 views
Dear all,

after finishing the installtion of Radcontrol for Winform Q1 2009 SP1 on Vista 32 Home Premium (German) there are the following problem in VS 2008.

I can't see the "Telerik Radform" template when i try to add a new item in the solution explorer.

The toolbox for Radcontrols Winform seems to be complete.

During installating there was no problem or error notifier.

I have just the VS 2008 Prof. (German) installed not the VS 2005.

Does anybody has an idear how to fix this

Kind Regards

Martin Gartmann

Jon Ronnenberg
Top achievements
Rank 1
 answered on 17 Oct 2009
2 answers
696 views
Is there a way to set the minimum date for a datetime picker in a grid view?  I am adding a GridViewDateTimeColumn in a grid view but I don't see a property related to minimum date on the GridViewDateTimeColumn class.

I am using the 2008 Q2 version in Winforms.

Thanks,
Byron
Thomas Douglas
Top achievements
Rank 1
 answered on 16 Oct 2009
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
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?