Telerik Forums
UI for WinForms Forum
1 answer
184 views
I have a Problem 

Click the minimize button, then click the maximize button, list item is not displayed.

p1.jpg is normal .
p2 is click the minize button .
private void Form1_Load(object sender, EventArgs e)
     {
         this.radListView1.ItemSize = new Size(200, 300);
         this.radListView1.AllowArbitraryItemHeight = true;
         this.radListView1.ItemSpacing = 5;
         this.radListView1.EnableKineticScrolling = false;
         this.radListView1.ListViewElement.ViewElement.ViewElement.Margin = new Padding(1, 1, 0, 0);
         this.radListView1.ListViewElement.ViewElement.Orientation = Orientation.Vertical;
         this.radListView1.AllowEdit = false;
         this.radListView1.Width = 210;
         for (int i = 0; i < 5; i++)
         {
             ListViewDataItem t = new ListViewDataItem();
             t.Tag = new string[] {"Name " + i.ToString(), "23", "uiui"};
              
             this.radListView1.Items.Add(t);
         }
     }
 
     private void radListView1_VisualItemCreating(object sender, ListViewVisualItemCreatingEventArgs e)
     {
         e.VisualItem = new CustomVisualItem();
     }
namespace TestListView
{
    internal class CustomVisualItem : IconListViewVisualItem
    {
        private LightVisualElement imageElement;
         private LightVisualElement titleElement;
         private LightVisualElement artistElement;
        private StackLayoutPanel stackLayout;
 
         
 
        // the base image of the radar
        // this saves time/cycles, b/c we only have to draw the
        // background of the radar once (and update it as necessary)
        Image _baseImage;
        // the final rendered image of the radar
        Image _outputImage;
 
        // the azimuth of the radar
        int _az = 0;
        // some internally used points for drawing the fade
        // of the radar scanline
        PointF _pt = new PointF(0F, 0F);
        PointF _pt2 = new PointF(1F, 1F);
        PointF _pt3 = new PointF(2F, 2F);
 
        Color _topColor = Color.FromArgb(0, 120, 0);
        Color _bottomColor = Color.FromArgb(0, 40, 0);
        Color _lineColor = Color.FromArgb(0, 255, 0);
        int _size = 200;
        private Timer _timer;
 
        // do draw the scanline or not to draw the scanline?
        bool _scanLine = false;
 
 
        public CustomVisualItem()
        {
            _timer = new Timer();
            _timer.Tick += new EventHandler(_timer_Tick);
           // _timer.Interval = 40;
 
            _timer.Interval = 625;
            CreateBaseImage();
            DrawScanLine = false;
             
            Draw();
            _timer.Enabled = false;
        }
 
        public PointF AzEl2XY(int azimuth, int elevation)
        {
            // rotate coords... 90deg W = 180deg trig
            double angle = (270d + (double)azimuth);
 
            // turn into radians
            angle *= 0.0174532925d;
 
            double r, x, y;
 
            // determine the lngth of the radius
            r = (double)_size * 0.5d;
            r -= (r * (double)elevation / 90);
 
            x = (((double)_size * 0.5d) + (r * Math.Cos(angle)));
            y = (((double)_size * 0.5d) + (r * Math.Sin(angle)));
 
            return new PointF((float)x, (float)y);
        }
 
        void _timer_Tick(object sender, EventArgs e)
        {
            // increment the azimuth
            if (DrawScanLine)
            {
                 
          
            _az++;
 
            // reset the azimuth if needed
            // if not, this will cause an OverflowException
            if (_az >=360)
            {
                _az = 0;
                DrawScanLine = false;
            }
 
 
            // update the fade path coordinates
            _pt = AzEl2XY(_az, 0);
            _pt2 = AzEl2XY(_az - 20, 0);
            _pt3 = AzEl2XY(_az - 10, -10);
 
            // redraw the output image
            Draw();
            }
        }
 
        public bool DrawScanLine
        {
            get
            {
                return _scanLine;
            }
            set
            {
                _scanLine = value;
            }
        }
 
 
        private void  CreateBaseImage()
        {
             
            // create the drawing objects
            Image i = new Bitmap(_size, _size);
            Graphics g = Graphics.FromImage(i);
            Pen p = new Pen(_lineColor);
            // set a couple of graphics properties to make the
            // output image look nice
            g.CompositingQuality = CompositingQuality.HighQuality;
            g.InterpolationMode = InterpolationMode.Bicubic;
            g.SmoothingMode = SmoothingMode.AntiAlias;
            // draw the background of the radar
            g.FillEllipse(new LinearGradientBrush(new Point((int)(_size / 2), 0), new Point((int)(_size / 2), _size - 1), _topColor, _bottomColor), 0, 0, _size - 1, _size - 1);
        
            // release the graphics object
            g.Dispose();
            // update the base image
            _baseImage =  i;
        }
 
        /// <summary>
        /// Draws the output image and fire the event caller for ImageUpdate
        /// </summary>
        void Draw()
        {
            // create a copy of the base image to draw on
            Image i = (Image)_baseImage.Clone();
            // create the circular path for clipping the output
            Graphics g = Graphics.FromImage(i);
            GraphicsPath path = new GraphicsPath();
            path.FillMode = FillMode.Winding;
            path.AddEllipse(-1F, -1F, (float)(_size + 1), (float)(_size + 1));
            g.Clip = new Region(path);
            g.CompositingQuality = CompositingQuality.HighQuality;
            g.InterpolationMode = InterpolationMode.Bicubic;
            g.SmoothingMode = SmoothingMode.AntiAlias;
      
            g.Dispose();
 
            _outputImage = i;
            this.imageElement.Image = _outputImage;
        }
        protected override void CreateChildElements()
        {
 
            base.CreateChildElements();
            stackLayout = new StackLayoutPanel();
            stackLayout.Orientation = System.Windows.Forms.Orientation.Vertical;
            imageElement = new LightVisualElement();
            imageElement.DrawText = false;
            imageElement.ImageLayout = System.Windows.Forms.ImageLayout.Zoom;
            imageElement.StretchVertically = false;
            imageElement.Margin = new System.Windows.Forms.Padding(10, 5, 10, 5);
             
            stackLayout.Children.Add(imageElement);
 
 
            titleElement = new LightVisualElement();
            titleElement.TextAlignment = ContentAlignment.MiddleLeft;
            titleElement.Margin = new Padding(10, 5, 10, 5);
            titleElement.Font = new System.Drawing.Font("Segoe UI", 12, FontStyle.Bold, GraphicsUnit.Point);
            titleElement.Text = "0";
            stackLayout.Children.Add(titleElement);
 
            artistElement = new LightVisualElement();
            artistElement.TextAlignment = ContentAlignment.MiddleLeft;
            artistElement.Margin = new Padding(10, 5, 10, 5);
            artistElement.Font = new System.Drawing.Font("Segoe UI", 9, FontStyle.Bold | FontStyle.Italic,GraphicsUnit.Point);
            artistElement.ForeColor = Color.FromArgb(255, 114, 118, 125);
            stackLayout.Children.Add(artistElement);
 
            this.Children.Add(stackLayout);
            this.Padding = new Padding(5);
            this.Shape = new RoundRectShape(3);
            this.BorderColor = Color.FromArgb(255, 110, 153, 210);
            this.BorderGradientStyle = GradientStyles.Solid;
            this.DrawBorder = true;
            this.DrawFill = true;
            this.BackColor = Color.FromArgb(255, 230, 238, 254);
            this.GradientStyle = GradientStyles.Solid;
        }
 
        protected override void SynchronizeProperties()
        {
            this.imageElement.Image = _outputImage;
            this.titleElement.Text = Convert.ToString(((string[])this.Data.Tag)[0]);
        }
 
        protected override SizeF MeasureOverride(SizeF availableSize)
        {
            SizeF measuredSize = base.MeasureOverride(availableSize);
            this.stackLayout.Measure(measuredSize);
            return measuredSize;
        }
 
        protected override SizeF ArrangeOverride(SizeF finalSize)
        {
            base.ArrangeOverride(finalSize);
            this.stackLayout.Arrange(new RectangleF(PointF.Empty, finalSize));
            return finalSize;
        }
 
    }
}

help me!
thanks!!!
Ivan Todorov
Telerik team
 answered on 20 Jul 2012
14 answers
1.5K+ views
I'd like to be able to use the GridView control to display elements of the data using the HtmlViewDefinition. I have three cells, one of which is on the first "line", and the other two are below it. When I display the data in the Grid, if I click on a "cell", it is highlighted in one color(orange), while the row itself is highlighted in another(light yellow). If I select another column, it goes to light yellow.

  1. How do I force the highlighting to take effect on the entire row?
  2. How do I allow someone to hold down the Control button and "deselect" that row, thus removing the highlighting?

Basically what I'm looking for is a way to simply display the data, and when they click on the row, I'll use a handle to determine the row ID to use to edit the row using another window. The data is far too complicated to edit directly in a grid.

Thanks in advance!
Svett
Telerik team
 answered on 20 Jul 2012
4 answers
243 views
I've found that if the number of items in the backstage item container is greater than the viewable area of the form, the items simply diappear from view and are inaccessible.  I've also noticed that "arrowing" through the pageview items is limited to only the items between the group headers.   Is it possible to add "scrolling ability" to the stripview item container of the backstage pageview so that all of my pageview items are accessible?   If not, any suggestions for another solution to this dilemma?

thanks
 
Ivan Todorov
Telerik team
 answered on 20 Jul 2012
1 answer
223 views
Hi telerik development's team !

 Now I'm using Telerik Control Q1 2012 (version 2012.1.12.215) and VS 2010, and I have a problem.
I declared attribute for GridView in OnLoad envent like the below code :
"this.UseCompatibleTextRendering = false;"
I run debug solution and the GridView in form like the attached image.
If you know this error, please tell me the solution.

 Best regard !
Svett
Telerik team
 answered on 20 Jul 2012
1 answer
87 views
To test this, I've added a RadAutoCompleteBox to a form in a new project and am using default settings. (No autocompletesource)

The problem is that under certain conditions, manually adding a new item does not work in specific locations.

I've tested and recorded each broken case from 1 to 6 items, refer to the attached image.  The "yes" and "no" represent whether or not it is possible to manually insert an item at that position.  As an example of this happening in the actual control (also pictured in the attached image), if you populate an AutoCompleteControl with three items and then try inserting an x at the beginning, pressing the semi-colon key will simply do nothing rather than adding a new item called x.

I noticed this bug in multiline mode as well, although I'm not sure whether or not the cases differ.

Thank you for your time.

Edit: Also, it seems that autoCompleteBox.Clear() does not work in the OnCollectionChanged event.  Is this intended functionality?
Svett
Telerik team
 answered on 19 Jul 2012
4 answers
212 views
Good afternoon Telerik team :)

I've been testing the new version of Telerik's RadDock control (2012 Q1) and I seem to have found a problem when closing the last document by middle clicking its tab.

An Unhandled null reference exception is thrown with the following stack trace:

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
   at Telerik.WinControls.RadControl.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.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)




************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.239 (RTMGDR.030319-2300)
    CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
RadDockPRoblem
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Projects/RadDockProblem/bin/Debug/RadDockPRoblem.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.235 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.232 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.225 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Telerik.WinControls.UI
    Assembly Version: 2012.1.12.215
    Win32 Version: 2012.1.12.0215
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.UI/2012.1.12.215__5bb2a467cbec794e/Telerik.WinControls.UI.dll
----------------------------------------
Telerik.WinControls.RadDock
    Assembly Version: 2012.1.12.215
    Win32 Version: 2012.1.12.0215
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls.RadDock/2012.1.12.215__5bb2a467cbec794e/Telerik.WinControls.RadDock.dll
----------------------------------------
Telerik.WinControls
    Assembly Version: 2012.1.12.215
    Win32 Version: 2012.1.12.0215
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Telerik.WinControls/2012.1.12.215__5bb2a467cbec794e/Telerik.WinControls.dll
----------------------------------------
TelerikCommon
    Assembly Version: 2012.1.12.215
    Win32 Version: 2012.1.12.0215
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/TelerikCommon/2012.1.12.215__5bb2a467cbec794e/TelerikCommon.dll
----------------------------------------
al30nzul
    Assembly Version: 2012.1.12.215
    Win32 Version: 4.0.30319.232 built by: RTMGDR
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------


************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.


For example:


<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>


When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

All other ways of closing a document seem to work just fine (ctrl-F4, close button on tab, close button on document's tab strip, selecting close or close all by right clicking the tab etc). If you try to perform this action while Designing the form (in VS2010), the instance of Visual Studio will close without warning.

I am attaching a sample project, just compile & run and try to close the document window by middle clicking on the window's tab header.
I was trying to find a way to disable this functionality (close window by middle clicking the document's tab) but I could not find any, do you have any suggestions?
Boryana
Telerik team
 answered on 19 Jul 2012
1 answer
92 views
Hello,

This may be more of a TreeView category, but I'll start here anyway.

We've been a subscriber to the Codejock FlexibleTreeView control for some time now. I've been round and round with one of the senior developers here about why we chose it in the first place and what it's usefulness is to the application.

Anyway, long story short, it has some draw backs that are getting in the way of migrating our application into current platforms: it's basically a 32-bit ActiveX OCX, chock full of all the goodness that goes with that territory as you can imagine.

So... We're also a subscriber to Telerik more recently, so I'd like to find out: what control(s) does Telerik support that would provide a comparable, though maybe not precisely identical, user experience as the FlexibleTreeView?

Thanks...
Jack
Telerik team
 answered on 19 Jul 2012
1 answer
126 views
Hi,

How do i prevent/trap the ctrl+c (paste) in a read only cell.

Thanks,
Svett
Telerik team
 answered on 19 Jul 2012
12 answers
469 views
Hi,

I use the RadControls for WinForms Q1 2012 SP1. I've localized my RadTimePicker Strings in C# exactly as you recommended it here. But the close button doesn't change to the localized string. Can you help me? 

Best, 

Peter 
Stefan
Telerik team
 answered on 19 Jul 2012
2 answers
1.2K+ views
Please take a look at the attached image.

As you can see I have vertical columns but I'm facing 2 problems.

1) The bigger issue is that for a lot of the columns, it cuts off the name and displays ... Even for the 1st one to show up the way it did, I for some reason had to expand the WIDTH of the Allocated To column. However all columns after the Reviewed column are dynamic and vary based on the database this is run against. See the image marked 2. I had to expand the last column to get the height to increase more and finally had to make it even wider for all the text to be readable. However I can't afford to make these columns that wide. Like I said they are dynamic and will hold at most 2 digits. I have searched your forums and tried the following but it does absolutely nothing. I have tried different numbers as well without luck.

rgv.TableElement.TableHeaderHeight = 200;

God knows why something that should be soooo simple is made so needlessly complex. I can't expand the height of the row by pulling down also on the row (or through code) but can increase it by increasing the column width. Who came up with this logic?

2) Would it be possible to have some columns show up horizontally and some vertically? This is not such a big deal...it would be a nice to have feature.

Issue #1 is more important so any help on that will be appreciated. 
Rahul
Top achievements
Rank 1
 answered on 19 Jul 2012
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?