Telerik Forums
UI for WinForms Forum
4 answers
206 views
Hi

I am adding items to listbox like this (from a background worker thread).

  dim d as New AddDelegate(AddressOf radListBox1.Items.Add)
  dim item as New RadListBoxItem
  item.Text = "some text"
  dim args() as Object = {item}
  radListBox1.Invoke(d, args)

However I sometimes get an error after some items are added (I think it
is also if an item is selected in the listbox and if I change hide and show the form). This is thrown on the main form. If tried using the BeginUpdate and EndUpdate method as well, but that doesn't seem to make a difference.

This is the message
    "Parameter is not valid."

Here is the stack trace

   at System.Drawing.Graphics.CheckErrorStatus(Int32 status)
   at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
   at System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
   at Telerik.WinControls.Paint.RadGdiGraphics.DrawBitmap(Image image, Int32 x, Int32 y, Double opacity)
   at Telerik.WinControls.Paint.RadGdiGraphics.DrawBitmap(Image image, Int32 x, Int32 y)
   at Telerik.WinControls.Primitives.FillElementPaintBuffer.ResetGraphics(IGraphics g, SizeF scale)
   at Telerik.WinControls.Primitives.FillPrimitive.PaintPrimitive(IGraphics g, Single angle, SizeF scale)
   at Telerik.WinControls.Primitives.BasePrimitive.PaintElement(IGraphics graphics, Single angle, SizeF scale)
   at Telerik.WinControls.RadElement.PaintElement(Graphics rawGraphics, IGraphics graphics, Single angle, SizeF scale, Region currentClip)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintOverride(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadItem.PaintOverride(IGraphics screenRadGraphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.VisualElement.PaintChildren(IGraphics graphics, Rectangle clipRectange, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RadElement.Paint(IGraphics graphics, Rectangle clipRectangle, Single angle, SizeF scale, Boolean useRelativeTransformation)
   at Telerik.WinControls.RootRadElement.Paint(IGraphics graphics, Rectangle clipRectangle)
   at Telerik.WinControls.RadControl.OnPaint(PaintEventArgs e)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   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 Dcsa.WpAdmin2.UI.Startup.Main() in C:\_SourceCode\DCX (SA) Workplace\Workplace.Windows\Workplace.Admin.UI\Startup.vb:line 7
   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()
Victor
Telerik team
 answered on 23 Nov 2009
5 answers
192 views
Hi Telerik

Can you give us a example how to implement the scroll bar to the telerik and Micorsoft Control? We can't find it User manual.

And  when we try to use the telerik control, we found "flicker" is a big problem at many place. Do you have anu good solution to make the change between the different control more smooth?

Thank you
Deyan
Telerik team
 answered on 23 Nov 2009
2 answers
96 views

hi,telerik,
   I'm a telerik user ,i encountered a problem when i used the gridview Control in my gui,i have two question as following:
  1>i just want to set the height of the header in the gridview,but i can't find out  which property should be set,could u pls give me an example  about how to implement it ?
  2>and another question ,when you set up a relation in the gridview ,and the childtable will be displayed in the current record,you will find a plus(+) image in the first cell ,i want to replace the plus(+) image with my image ,and how to implement ?
 thanks for you help and support

 

Ray Wang
Top achievements
Rank 1
 answered on 23 Nov 2009
2 answers
226 views
Hi,

I am in a fix right  now.
I want a column to have radio buttons yes or no depending upon the questions in the previous column.

For eg if question is do you want coffee in the prev column the ans would be yes or no.

Again if the question is how much creme> the radio button cell now becomes a text box cell .

So I want the column to be radio button or text box cell depending upon the prev column.

I have used the code provided in the radiobuttoncolumn in prev telerik posts ... It works fine if i just want radio button. But what if i want to have a single column as radiobutton or text box...Please explain. If there is a snippet that would help too.. 


More over how do i make the text box column enter multiline text and have accept return in it..

Thanks,



Smitha Test
Top achievements
Rank 1
 answered on 20 Nov 2009
1 answer
179 views
Before I beat myself silly,  Is it possible in WinForms to have nested MDI parents. Or in other words a MDI child that is also a MDI Parent.
Seems reasonable... but you cannot in standard .Net.

Why you ask?  I am building a Dashboard type app where the main dashboard (or desktop) is a MDI form.  But when the user opens a 'project' folder, I would like it to be a MDI parent as well, so subsequent forms etc will stay in the projects mini-dashboard.

Thanks
Ray



Deyan
Telerik team
 answered on 20 Nov 2009
3 answers
58 views
Hello,
In design I am adding Item 10 to TabStrip collection.  I have named it TabOnline, however the ContentPanel name is TabItem1.  However if I select the tab and then the content panel, it is correctly called TabOnline.  Also, in the code it does not know the tabitem TabOnline.  I've tried deleting and readding the item and tried a different name too.  I've even tried keeping the tab the default of TabItem1, but it still is not available in code.
I did install Q3 yesterday.
Thanks.
Martin Vasilev
Telerik team
 answered on 20 Nov 2009
1 answer
81 views
I'd like to put in a vote for a ListView control , I myself and many people I know still find using listviews very useful especially with their capacity for multiple style views. Possibly also a TreeListView like the silverlight suite has too ?

I'd love to see versions for winforms and for wpf .
Nikolay
Telerik team
 answered on 20 Nov 2009
1 answer
92 views
I've got an empty winform where I want to drag and drop the new radgridview Q3 2009. But when dropped I'm getting a messagebox with the following error:

"No such property registered: IsMouseOverScrollBar, Telerik.WinControls.UI.RadScrollBarElement"

Before doing this I inserted all .dll files into visual studio 2008 into a new tab called "Telerik Q3 2009". I've got another tab called "Telerik Q1 2009" with those controls that I'm currently using in my prototype.

Now I looked in the folder with the new dll"s, trying to find this element, but couldn't find it. I also didn't find this element in the "Choose Items". So I don't think that I missed a dll file to import into visual studio.

Any solutions?
Thanks
Nikolay
Telerik team
 answered on 20 Nov 2009
7 answers
760 views
I trying implement a Shift-F10 key to activate the ContextMenu.  I have the Key trapped inside the KeyDown Event, but I don't know how to activate the ContextMenu.  RadGridView.ContextMenuStrip is Nothing.

2009Q2 (2009.2.9.729), VS 2005 (v8.0.50727.762 SP.050727-7600), .Net2 (2.0.50727), XP SP3, Core2Duo 2.99GHZ with 3GB.



Martin Vasilev
Telerik team
 answered on 20 Nov 2009
6 answers
222 views
We're trying to automate testing of the WinControls using a couple of different tools (QTP and Project White) .  These tools use the Microsoft UI Automation framework.  We are using UI Spy to find Telerik controls in our WinForms application and they don't show up. 

We have an immediate need for UI automation.  What are your plans for providing support for Microsoft's UI automation framework?
Georgi
Telerik team
 answered on 19 Nov 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)
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
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
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
CheckedListBox
StatusStrip
LayoutControl
SyntaxEditor
Wizard
ShapedForm
TextBoxControl
Conversational UI, Chat
DateTimePicker
CollapsiblePanel
TabbedForm
CAB Enabling Kit
GroupBox
WaitingBar
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
Styling
Barcode
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Callout
ColorBox
PictureBox
FilterView
NavigationView
Accessibility
VirtualKeyboard
DataLayout
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Licensing
Localization
TimePicker
ButtonTextBox
FontDropDownList
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
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?