Telerik Forums
UI for WinForms Forum
1 answer
184 views
 Private blnMoving As Boolean = False
    Private MouseDownX As Integer
    Private MouseDownY As Integer
    Private MovingRect As Rectangle
    Private oldRect As Rectangle
    Private blnClick As Boolean = False
 
    Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
        If e.Button = MouseButtons.Left Then
            blnMoving = True
            MouseDownX = e.X
            MouseDownY = e.Y
            MovingRect = New Rectangle(Button1.Location, Button1.Size)
        End If
    End Sub
 
    Private Sub Button1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseUp
        If e.Button = MouseButtons.Left And Not blnClick Then
            Button1.Location = Me.PointToClient(New Point(MovingRect.X, MovingRect.Y))
            Me.Refresh()
            oldRect = oldRect.Empty
            blnMoving = False
        Else
            blnClick = False
            blnMoving = False
        End If
    End Sub
 
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        blnClick = True
    End Sub
 
    Private Sub Button1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseMove
        If blnMoving Then
            If Not oldRect.IsEmpty Then
                ControlPaint.DrawReversibleFrame(MovingRect, Me.BackColor, FrameStyle.Thick)
                Button1.Refresh()
            End If
 
            Dim temp As Point = Me.PointToScreen(New Point(Button1.Location.X + (e.X - MouseDownX), Button1.Location.Y + (e.Y - MouseDownY)))
 
            MovingRect.X = temp.X
            MovingRect.Y = temp.Y
 
            If Me.ClientRectangle.Contains(Me.RectangleToClient(MovingRect)) Then
                oldRect = MovingRect
            Else
                MovingRect = oldRect
            End If
            ControlPaint.DrawReversibleFrame(MovingRect, SystemColors.Control, FrameStyle.Thick)
        End If
    End Sub
but my need is form main form if i click button it open one floating form and it contains controls,and form that folating form i need to click the control and drag and drop in main form.And also capture and save the location in form ,if i close application and open again i need to fix button in last time saved x and y axis location, so where i capture the x axis and y axis ? is it possible to capture x axis and y axis in sql server ?,and if i open again is possible to retrive data from sql server and give to controls ?
Is it possible ?
 
Regards
Aravind
Dimitar
Telerik team
 answered on 23 Aug 2013
12 answers
892 views
Hi,

I have a radlistview on my form with a datasource set and a displaymember set at designtime.

The problem is that my display member may be of varying lengths and may not fit into one line.  Is there anyway to make the radlistview display with a wordwrap when necessary i.e some items may be over one line, some over two and some may have even three lines.

Many thanks.
Hassan
Top achievements
Rank 1
 answered on 23 Aug 2013
1 answer
184 views
I have a radgridview which has several columns and each row of data has templates..so on expanding a column we can see a bunch of new expanded rows..

But at the very end I have a few total rows which do not have these expanded rows..I want to set a specific backcolour for each of the columns (cells) based on a bool value. The bool value is a hidden checkbox column in the grid itself.

The scenario is 
1. There are two hidden checkbox columns History and Totals which give me bool values
2. If History = True for any row then all the columns will be gray
3. If Total = true for any row then all the columns will be blue
4. If History = False and Total = False then I have separate colour code for each column.
5. History and Total both can never be true for any row.
6. I want to colour only the parent rows and not the template within each parent row.

Please help!
Dimitar
Telerik team
 answered on 22 Aug 2013
1 answer
123 views
Hello!
Can a Radchart for Winforms have a custom table below the chart, like in the photo I have sent you  ?
How can I select this? 

Thank you
Dimitar
Telerik team
 answered on 22 Aug 2013
1 answer
137 views
lst.Popup.MouseClick += new MouseEventHandler(Popup_MouseClick);


Popup_MouseClick not firing. 


Any idea?
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Aug 2013
5 answers
332 views
I'm using RadControls for WinForms 2011.3 11.1116
I have a long operation that is fired at SelectedIndexChanged of an RadDropDownList.
The problem is that when the user makes a selection by opening the popup, the SelectedIndexChanged is fired and the popup is still visible while the long operation associated with the event takes place.
In earlier version(of RadControls) i used a RadComboBox and delayed the SelectedIndexChanged to be fired after the PopupClosed event. This fix for my problem it no longer works with the RadDropDownList because the PopupClosed is fired before the SelectedIndexChanged and while the subscriber of the event is running the IsPopupVisible property is false and the popup is actually visible.
Can you help me identify:
    - an method i could override or event running after the SelectedIndexChanged is fired
    - a property that will indicate me if the Popup is visible or not while processing a subscriber of the SelectedIndexChanged.

Thanks

P.S. I know that moving that operation in a background thread is an alternative solution to my problem, but is not working for me (not because of my skill, the scenario is far more complex than you imagine, and serializing operations via ManualResetEvent is throwing too much complexity in an already complex system)
Peter
Telerik team
 answered on 21 Aug 2013
2 answers
252 views
Hi,

i have a radChartView docking to a Window (in Designer 600x300px) filled with a DataTable, 5 values with price and Date.

linePrice = new DataTable();
linePrice.Columns.Add("Price", typeof(float));
linePrice.Columns.Add("Date", typeof(DateTime));
 
LineSeries lineSeria = new LineSeries();
radChartView1.Series.Add(lineSeria);

lineSeria.ShowLabels = true;
lineSeria.LabelFormat = "{0:C}";
lineSeria.ValueMember = "Price";
lineSeria.CategoryMember = "Date";
lineSeria.DataSource = linePrice;
 
DateTimeCategoricalAxis categoricalAxis = new DateTimeCategoricalAxis();
categoricalAxis.DateTimeComponent = DateTimeComponent.Day;
categoricalAxis.MajorTickInterval = 1;
categoricalAxis.PlotMode = AxisPlotMode.BetweenTicks;
categoricalAxis.LabelFormat = "{0:dd}.{0:MM}.{0:yyyy}";
 
lineSeria.HorizontalAxis = categoricalAxis;
 


if i resize the Window greater then 600x300px, everything grows correctly but the line is only visible in the 600x300px field (see Images)

And my second problem/wish: i want the Horizontal Axis linear, like this http://www.telerik.com/help/winforms/chartview-axes-linear.html just with Dates. The Dates in the graph are order dates, so i need to visualise if there are much or less time between them.

thanks in advance

using 2013.2.724.40
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Aug 2013
1 answer
184 views
Is there any way to catch the ZoomGesture in desktop App? i mean not in touch input device

On the other hand, how can i make zoom to specific area of data? without zoomfactor
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 20 Aug 2013
4 answers
277 views
I have noticed some strange behavior when I try to save a chart as an image.  The x and y axis show up with labels and the correct range but there are no bars.

    Private Function GetDummyList() As BindingList(Of RateShockData)
        Dim l As New BindingList(Of RateShockData)
        l.Add(New RateShockData("+300", "-13.9"))
        l.Add(New RateShockData("+200", "-9"))
        l.Add(New RateShockData("+100", "-3.9"))
        l.Add(New RateShockData("even", "0"))
        l.Add(New RateShockData("-100", "-.2"))
        l.Add(New RateShockData("-200", "1"))
        l.Add(New RateShockData("-300", "2.2"))
        Return l
    End Function
 
    Private Function BuildChart()
        Dim c1 As New RadChartView
 
        Dim bs As New BarSeries
        bs.Name = "Market % Change"
        bs.ValueMember = "MVPctChange"
        bs.CategoryMember = "BPChange"
        bs.DataSource = GetDummyList()
 
        c1.Series.Clear()
        c1.Series.Add(bs)
 
        Dim bitM As New Bitmap(c1.Width, c1.Height)
        c1.DrawToBitmap(bitM, c1.Bounds)
 
        Dim imageFileName As String = Guid.NewGuid.ToString + ".jpg"
        bitM.Save(imageFileName, Drawing.Imaging.ImageFormat.Jpeg)
    End Function
 
    Private Sub RadButton2_Click(sender As Object, e As EventArgs) Handles RadButton2.Click
        BuildChart()
 
    End Sub
 
 
Public Class RateShockData
 
    Property BPChange As String
    Property MVPctChange As String
 
    Public Sub New(bpc As String, mvpc As String)
        BPChange = bpc
        MVPctChange = mvpc
    End Sub
 
End Class

The above code is what I used to produce this.  I am using version 2012.2.726.40.

I discovered that if I give the chart a palette, this issue goes away.

c1.Area.View.Palette = KnownPalette.Grayscale

Ivan Petrov
Telerik team
 answered on 20 Aug 2013
3 answers
167 views
#1
On the RadScheduler, AddDay appointments are displayed at the top ... above appointments with appointment times.  Appointments with times show the times on the very left of the control.  AllDay appointments do not show the appointment times ... that space is blank.  Do I have access to that area?  How can I draw vertical text in that area (above the word "Local")?

#2
In daily view, is there a way to limit the number of AllDay events displayed so that any beyond that number trigger a vertical scroll bar and are scrolled instead of making the appointments section so small as to be unusable?
George
Telerik team
 answered on 20 Aug 2013
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?