How to make a double trackbar control in VB 2010

I'm suing VB 2010 Express and I need to create a trackbar control with double trackbars.
I can't find "Doubletrackbar" control from Toolbox. I searched online and found one post toking about it (http://www.vbforums.com/showthread.php?620394-WIP-Double-TrackBar). Unfortunately, I can't use the code in the post.   Anyone can
help?
Thank you very much.

Hi,
 Whoever made it did not have Option Strict turned on and there was also a namespace that was not imported. I just went through the code and fixed all the errors and added the namespace. It seems to be working after that.
 Open your  project or even a new form project just to test it on. When the project is opened go to the VB Menu and click (Project) and then select (Add Class). You can leave it named as the default name "Class1.vb" if you want. When
the empty class code opens, copy and paste the fixed code below in replacing the 2 lines of code that are generated automatically. Save the project.
 Then go to the VB Menu and click (Build) and select (Build YourProjectsName). After it is finished building you can go to the Forms [Design] tab and you will find the DoubleTrackBar control in the top of your toolbox.   8)
Imports System.ComponentModel
Public Class DoubleTrackBar
Inherits Control
Public Sub New()
Me.DoubleBuffered = True
Me.SetDefaults()
End Sub
Private Sub SetDefaults()
'Added these to set to a decent size when a new one is added to the form
Me.Width = 200
Me.Height = 50
Me.Orientation = Orientation.Horizontal
Me.SmallChange = 1
Me.Maximum = 400
Me.Minimum = 0
Me.ValueLeft = 0
Me.ValueRight = 300
End Sub
#Region " Private Fields "
Private leftThumbState As VisualStyles.TrackBarThumbState
Private rightThumbState As VisualStyles.TrackBarThumbState
Private draggingLeft, draggingRight As Boolean
#End Region
#Region " Enums "
Public Enum Thumbs
None = 0
Left = 1
Right = 2
End Enum
#End Region
#Region " Properties "
Private _SelectedThumb As Thumbs
''' <summary>
''' Gets the thumb that had focus last.
''' </summary>
''' <returns>The thumb that had focus last.</returns>
<Description("The thumb that had focus last.")> _
Public Property SelectedThumb() As Thumbs
Get
Return _SelectedThumb
End Get
Private Set(ByVal value As Thumbs)
_SelectedThumb = value
End Set
End Property
Private _ValueLeft As Integer
''' <summary>
''' Gets or sets the position of the left slider.
''' </summary>
''' <returns>The position of the left slider.</returns>
<Description("The position of the left slider.")> _
Public Property ValueLeft() As Integer
Get
Return _ValueLeft
End Get
Set(ByVal value As Integer)
If value < Me.Minimum OrElse value > Me.Maximum Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueLeft'. 'ValueLeft' should be between 'Minimum' and 'Maximum'.", value.ToString()), "ValueLeft")
End If
If value > Me.ValueRight Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueLeft'. 'ValueLeft' should be less than or equal to 'ValueRight'.", value.ToString()), "ValueLeft")
End If
_ValueLeft = value
Me.OnValueChanged(EventArgs.Empty)
Me.OnLeftValueChanged(EventArgs.Empty)
Me.Invalidate()
End Set
End Property
Private _ValueRight As Integer
''' <summary>
''' Gets or sets the position of the right slider.
''' </summary>
''' <returns>The position of the right slider.</returns>
<Description("The position of the right slider.")> _
Public Property ValueRight() As Integer
Get
Return _ValueRight
End Get
Set(ByVal value As Integer)
If value < Me.Minimum OrElse value > Me.Maximum Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueRight'. 'ValueRight' should be between 'Minimum' and 'Maximum'.", value.ToString()), "ValueRight")
End If
If value < Me.ValueLeft Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'ValueRight'. 'ValueRight' should be greater than or equal to 'ValueLeft'.", value.ToString()), "ValueLeft")
End If
_ValueRight = value
Me.OnValueChanged(EventArgs.Empty)
Me.OnRightValueChanged(EventArgs.Empty)
Me.Invalidate()
End Set
End Property
Private _Minimum As Integer
''' <summary>
''' Gets or sets the minimum value.
''' </summary>
''' <returns>The minimum value.</returns>
<Description("The minimum value.")> _
Public Property Minimum() As Integer
Get
Return _Minimum
End Get
Set(ByVal value As Integer)
If value >= Me.Maximum Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'Minimum'. 'Minimum' should be less than 'Maximum'.", value.ToString()), "Minimum")
End If
_Minimum = value
Me.Invalidate()
End Set
End Property
Private _Maximum As Integer
''' <summary>
''' Gets or sets the maximum value.
''' </summary>
''' <returns>The maximum value.</returns>
<Description("The maximum value.")> _
Public Property Maximum() As Integer
Get
Return _Maximum
End Get
Set(ByVal value As Integer)
If value <= Me.Minimum Then
Throw New ArgumentException(String.Format("Value of '{0}' is not valid for 'Maximum'. 'Maximum' should be greater than 'Minimum'.", value.ToString()), "Maximum")
End If
_Maximum = value
Me.Invalidate()
End Set
End Property
Private _Orientation As Orientation
''' <summary>
''' Gets or sets the orientation of the control.
''' </summary>
''' <returns>The orientation of the control.</returns>
<Description("The orientation of the control.")> _
Public Property Orientation() As Orientation
Get
Return _Orientation
End Get
Set(ByVal value As Orientation)
_Orientation = value
End Set
End Property
Private _SmallChange As Integer
''' <summary>
''' Gets or sets the amount of positions the closest slider moves when the control is clicked.
''' </summary>
''' <returns>The amount of positions the closest slider moves when the control is clicked.</returns>
<Description("The amount of positions the closest slider moves when the control is clicked.")> _
Public Property SmallChange() As Integer
Get
Return _SmallChange
End Get
Set(ByVal value As Integer)
_SmallChange = value
End Set
End Property
Private ReadOnly Property RelativeValueLeft() As Double
Get
Dim diff As Double = Me.Maximum - Me.Minimum
Return If(diff = 0, Me.ValueLeft, Me.ValueLeft / diff)
End Get
End Property
Private ReadOnly Property RelativeValueRight() As Double
Get
Dim diff As Double = Me.Maximum - Me.Minimum
Return If(diff = 0, Me.ValueLeft, Me.ValueRight / diff)
End Get
End Property
#End Region
#Region " Methods "
Public Sub IncrementLeft()
Dim newValue As Integer = Math.Min(Me.ValueLeft + 1, Me.Maximum)
If Me.IsValidValueLeft(newValue) Then
Me.ValueLeft = newValue
End If
Me.Invalidate()
End Sub
Public Sub IncrementRight()
Dim newValue As Integer = Math.Min(Me.ValueRight + 1, Me.Maximum)
If Me.IsValidValueRight(newValue) Then
Me.ValueRight = newValue
End If
Me.Invalidate()
End Sub
Public Sub DecrementLeft()
Dim newValue As Integer = Math.Max(Me.ValueLeft - 1, Me.Minimum)
If Me.IsValidValueLeft(newValue) Then
Me.ValueLeft = newValue
End If
Me.Invalidate()
End Sub
Public Sub DecrementRight()
Dim newValue As Integer = Math.Max(Me.ValueRight - 1, Me.Minimum)
If Me.IsValidValueRight(newValue) Then
Me.ValueRight = newValue
End If
Me.Invalidate()
End Sub
Private Function IsValidValueLeft(ByVal value As Integer) As Boolean
Return (value >= Me.Minimum AndAlso value <= Me.Maximum AndAlso value < Me.ValueRight)
End Function
Private Function IsValidValueRight(ByVal value As Integer) As Boolean
Return (value >= Me.Minimum AndAlso value <= Me.Maximum AndAlso value > Me.ValueLeft)
End Function
Private Function GetLeftThumbRectangle(Optional ByVal g As Graphics = Nothing) As Rectangle
Dim shouldDispose As Boolean = (g Is Nothing)
If shouldDispose Then g = Me.CreateGraphics()
Dim rect As Rectangle = Me.GetThumbRectangle(Me.RelativeValueLeft, g)
If shouldDispose Then g.Dispose()
Return rect
End Function
Private Function GetRightThumbRectangle(Optional ByVal g As Graphics = Nothing) As Rectangle
Dim shouldDispose As Boolean = (g Is Nothing)
If shouldDispose Then g = Me.CreateGraphics()
Dim rect As Rectangle = Me.GetThumbRectangle(Me.RelativeValueRight, g)
If shouldDispose Then g.Dispose()
Return rect
End Function
Private Function GetThumbRectangle(ByVal relativeValue As Double, ByVal g As Graphics) As Rectangle
Dim size As Size = TrackBarRenderer.GetBottomPointingThumbSize(g, VisualStyles.TrackBarThumbState.Normal)
Dim border As Integer = CInt(size.Width / 2)
Dim w As Integer = Me.GetTrackRectangle(border).Width
Dim x As Integer = CInt(Math.Abs(Me.Minimum) / (Me.Maximum - Me.Minimum) * w + relativeValue * w)
Dim y As Integer = CInt((Me.Height - size.Height) / 2)
Return New Rectangle(New Point(x, y), size)
End Function
Private Function GetTrackRectangle(ByVal border As Integer) As Rectangle
'TODO: Select Case for hor/ver
Return New Rectangle(border, CInt(Me.Height / 2) - 3, Me.Width - 2 * border - 1, 4)
End Function
Private Function GetClosestSlider(ByVal point As Point) As Thumbs
Dim leftThumbRect As Rectangle = Me.GetLeftThumbRectangle()
Dim rightThumbRect As Rectangle = Me.GetRightThumbRectangle()
If Me.Orientation = Windows.Forms.Orientation.Horizontal Then
If Math.Abs(leftThumbRect.X - point.X) > Math.Abs(rightThumbRect.X - point.X) _
AndAlso Math.Abs(leftThumbRect.Right - point.X) > Math.Abs(rightThumbRect.Right - point.X) Then
Return Thumbs.Right
Else
Return Thumbs.Left
End If
Else
If Math.Abs(leftThumbRect.Y - point.Y) > Math.Abs(rightThumbRect.Y - point.Y) _
AndAlso Math.Abs(leftThumbRect.Bottom - point.Y) > Math.Abs(rightThumbRect.Bottom - point.Y) Then
Return Thumbs.Right
Else
Return Thumbs.Left
End If
End If
End Function
Private Sub SetThumbState(ByVal location As Point, ByVal newState As VisualStyles.TrackBarThumbState)
Dim leftThumbRect As Rectangle = Me.GetLeftThumbRectangle()
Dim rightThumbRect As Rectangle = Me.GetRightThumbRectangle()
If leftThumbRect.Contains(location) Then
leftThumbState = newState
Else
If Me.SelectedThumb = Thumbs.Left Then
leftThumbState = VisualStyles.TrackBarThumbState.Hot
Else
leftThumbState = VisualStyles.TrackBarThumbState.Normal
End If
End If
If rightThumbRect.Contains(location) Then
rightThumbState = newState
Else
If Me.SelectedThumb = Thumbs.Right Then
rightThumbState = VisualStyles.TrackBarThumbState.Hot
Else
rightThumbState = VisualStyles.TrackBarThumbState.Normal
End If
End If
End Sub
Protected Overrides Sub OnMouseMove(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseMove(e)
Me.SetThumbState(e.Location, VisualStyles.TrackBarThumbState.Hot)
Dim offset As Integer = CInt(e.Location.X / (Me.Width) * (Me.Maximum - Me.Minimum))
Dim newValue As Integer = Me.Minimum + offset
If draggingLeft Then
If Me.IsValidValueLeft(newValue) Then Me.ValueLeft = newValue
ElseIf draggingRight Then
If Me.IsValidValueRight(newValue) Then Me.ValueRight = newValue
End If
Me.Invalidate()
End Sub
Protected Overrides Sub OnMouseDown(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseDown(e)
Me.Focus()
Me.SetThumbState(e.Location, VisualStyles.TrackBarThumbState.Pressed)
draggingLeft = (leftThumbState = VisualStyles.TrackBarThumbState.Pressed)
If Not draggingLeft Then draggingRight = (rightThumbState = VisualStyles.TrackBarThumbState.Pressed)
If draggingLeft Then
Me.SelectedThumb = Thumbs.Left
ElseIf draggingRight Then
Me.SelectedThumb = Thumbs.Right
End If
If Not draggingLeft AndAlso Not draggingRight Then
If Me.GetClosestSlider(e.Location) = 1 Then
If e.X < Me.GetLeftThumbRectangle().X Then
Me.DecrementLeft()
Else
Me.IncrementLeft()
End If
Me.SelectedThumb = Thumbs.Left
Else
If e.X < Me.GetRightThumbRectangle().X Then
Me.DecrementRight()
Else
Me.IncrementRight()
End If
Me.SelectedThumb = Thumbs.Right
End If
End If
Me.Invalidate()
End Sub
Protected Overrides Sub OnMouseUp(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseUp(e)
draggingLeft = False
draggingRight = False
Me.Invalidate()
End Sub
Protected Overrides Sub OnMouseWheel(ByVal e As System.Windows.Forms.MouseEventArgs)
MyBase.OnMouseWheel(e)
If e.Delta = 0 Then Return
If Me.SelectedThumb = 1 Then
If e.Delta > 0 Then
Me.IncrementLeft()
Else
Me.DecrementLeft()
End If
ElseIf Me.SelectedThumb = 2 Then
If e.Delta > 0 Then
Me.IncrementRight()
Else
Me.DecrementRight()
End If
End If
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
Dim thumbSize As Size = Me.GetThumbRectangle(0, e.Graphics).Size
Dim trackRect As Rectangle = Me.GetTrackRectangle(CInt(thumbSize.Width / 2))
Dim ticksRect As Rectangle = trackRect
ticksRect.Offset(0, -15) 'changed to -15 to place ticks at the top
'added this to keep ticks at a decent spacing
Dim tickspacing As Integer = CInt((Me.Maximum - Me.Minimum) / 10) + 1
TrackBarRenderer.DrawHorizontalTrack(e.Graphics, trackRect)
TrackBarRenderer.DrawHorizontalTicks(e.Graphics, ticksRect, tickspacing, VisualStyles.EdgeStyle.Etched)
'Changed these to draw the top pointing thumb button
TrackBarRenderer.DrawTopPointingThumb(e.Graphics, Me.GetLeftThumbRectangle(e.Graphics), leftThumbState)
TrackBarRenderer.DrawTopPointingThumb(e.Graphics, Me.GetRightThumbRectangle(e.Graphics), rightThumbState)
End Sub
#End Region
#Region " Events "
Public Event ValueChanged As EventHandler
Public Event LeftValueChanged As EventHandler
Public Event RightValueChanged As EventHandler
Protected Overridable Sub OnValueChanged(ByVal e As EventArgs)
RaiseEvent ValueChanged(Me, e)
End Sub
Protected Overridable Sub OnLeftValueChanged(ByVal e As EventArgs)
RaiseEvent LeftValueChanged(Me, e)
End Sub
Protected Overridable Sub OnRightValueChanged(ByVal e As EventArgs)
RaiseEvent RightValueChanged(Me, e)
End Sub
#End Region
End Class
If you say it can`t be done then i`ll try it

Similar Messages

  • How to make a valve in control editor?

    I want to make a control function in Labview5.0,but I don't know how to make it,for example I will make a valve that is a control funtion,how to make it properly

    If you were to go to Search Examples>Demonstrations>Process Control>Control Mixer Process, you'll find a VI with several custom controls including a valve. All it is is a boolean with custom images. To make your own, use a drawing program like Paint and make images of your valve in the open and closed state. Place a boolean control on a VI's front panel and choose Edit Control from the Edit menu. Once in the control editor go to customize mode. Choose Import Picture From File from the Edit menu. Right click the boolean control and choose Picture Item to Replace to determine which picture to replace with the one from file (a boolean actually uses 4 pictures but you only need to replace the first two which are the true and false states). Right click again and
    choose either Import Picture or Import at Same Size. Repeat for the other boolean state with a different picture. You should save your changes as a .ctl so that you can easily use it again.

  • How to make Rectangle2D.Double serializable?

    I like to store Objects of the Class Rectangle2D ?
    It sems that they are not serializable, even if the parent Class of the parent Class is serializible, because I get the following error:
    java.io.NotSerializableException: java.awt.geom.Rectangle2D$Double
    Who can I make Rectangle2D.Double serializable? I tried this way:
    1.Create a new Class MyRectangle2D that extends Rectangle2D.Double and that implements the Interface Serializable
    2.define the following funtions:
    private void writeObject(java.io.ObjectOutputStream out)
    throws IOException{...
    and
    private void readObject(java.io.ObjectInputStream in)
    throws IOException, ClassNotFoundException{
    But what I have to write in these Methods?
    I tried to write every element x,y w and height of the rectangle seperatly.
    Thanks for your help.

    I like to store Objects of the Class Rectangle2D ?
    It sems that they are not serializable, even if the parent Class of the parent Class is serializible, because I get the following error:
    java.io.NotSerializableException: java.awt.geom.Rectangle2D$Double
    Who can I make Rectangle2D.Double serializable? I tried this way:
    1.Create a new Class MyRectangle2D that extends Rectangle2D.Double and that implements the Interface Serializable
    2.define the following funtions:
    private void writeObject(java.io.ObjectOutputStream out)
    throws IOException{...
    and
    private void readObject(java.io.ObjectInputStream in)
    throws IOException, ClassNotFoundException{
    But what I have to write in these Methods?
    I tried to write every element x,y w and height of the rectangle seperatly.
    Thanks for your help.

  • How to make non-visibl​e Control on Front Panel Appear at Design Time?

    I have some Controls on the Front Panel whose visibility is changed (turned on or off) at Run Time. The problem is that if I stop the Run time, the Visibility of the Control remains in the runtime state in Design mode. So I may not be able to see or find the Control to make changes in Deisgn mode.
    How can I make all Controls on the Front Panel visible, or find and make visible a Control on the Front Panel whose Visibility has been made False?
    THANKS.
    Solved!
    Go to Solution.

    This is documented in the LabVIEW Help.
    Displaying Hidden Front Panel Objects
    Complete the following steps to display a hidden front panel control or indicator. You also can hide front panel controls and indicators.
    Find the block diagram terminal for the object. If you have several terminals with the same data type, right-click the terminals and select Visible Items»Label from the shortcut menu. Find the object with the label that matches the hidden front panel object.
    Right-click the terminal and select Show Control from the shortcut menu if the object is a control or Show Indicator if the object is an indicator.
    You also can use the Visible property to display controls and indicators programmatically.
    You also can display all hidden front panel controls and indicators.
    Path: Fundamentals -> Building the Front Panel -> How-To -> Configuring Front Panel Objects -> Displaying Hidden Front Panel Objects.

  • How to make my waveform in control and design simulation run continuously?

    Hi all, i m a begineer of Labview and have some question to ask.
    I am using the Labview to design and implement a controller for FOPTD system, but i found that the waveform in the "control and simulation loop" is not running continuously. I mean it keep repeat in the same graph from 0 to 10second. Is there any approach to make it run continuously? 
    Thankyou very much.
    Solved!
    Go to Solution.
    Attachments:
    Project 1.png ‏12 KB
    Project 2.png ‏18 KB

    Well, my suggestion then is to do the following: change final time from Inf back to 10 s (or whatever number that capture the whole simulation) and do a while loop around the Control and Simulation Loop with a "wait until next ms" function to give you time to react and change parameters, like this below. This would make LabVIEW to do the whole simulation, wait for 1000 ms and then, run the simulation again with new parameters. If you need more time, just need to change the constant wired to the "wait until next milisecond".
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • How to make default value for controlling area for MDG-F 7.0

    how do we default certain pre-defined values for few fields? e.g. controlling area or company code for MDG finance?
    Thank you in advance.
    SP

    Hello Sahil
    Account and CC/PC are 2 different entity types. For PC and CC there is dependency. First you have to load Cost centers and then load PC.
    For CC - load CC master data first. Then load hierarchy file then group file and finally assignment file.
    Follow same process for PC.
    GL you can load independently but you have first load group GL then operational GL and then GL at company code level,
    Kiran

  • How I make the Web Browser Control to display a PDF in Windows 8

    I have an application that run ok in previous version of windows,  Where I can load a PDF file and the web browser control automatically use the Reader OCX of Adobe,, After Install windows 8 and download the reader for windows 8 still get and (X) where the document should be displayed.  I use the following command in my program to force the windows 8 to use the same web browser (10) in my web browser control.
    WebBrowser1.Navigate(DocumentName,"",Nothing,"User-Agent:Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)")
    But still get an  (X). IF I use the URL that is in the property of the (X) and paste in my regular IE10, it open the PDF file.

    Adobe Reader Touch is a Windows Store app and does not install a browser add-on/plug-in for "in-browser" PDF viewing.
    You can either
    Install Adobe Reader XI (desktop app) which installs browser plug-ins for Microsoft IE and Mozilla Firefox
    Use Google Chrome, which has a built-in PDF viewer (enabled by default)

  • How to make a device selector control?

    Hello all,
    Some months ago I saw a simple control that allowed me to select device/channel, but now I just cannot find it (either in Google or in CVI).
    Right now I am using DAQmxGetSystemInfoAttribute() and DAQmxGetDeviceAttribute() functions to query the available channels.
    Thanks for the help in advance!
    Yours,
    Adrian
    Solved!
    Go to Solution.

    This KnowledgeBase entry can help you in configuring the controls.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • I have my iPhone locked and I don't want the music controls to pop up when I double click the home button. Does anyone know how to make it stop?

    I have my iPhone locked and I don't want the music controls to pop up when I double click the home button. Does anyone know how to make it stop?

    what exactly are you trying to accomplish here? i understand that you don't want to see the music status come up on your lock screen, but what are you trying to do by clicking your home button at all?

  • HOw to make an Object oriented alv respond to double click

    Hi all,
    HOw to make an Object oriented alv respond to double click.SAmple code will be helpful.
    Thanks in advance,
    Alex.

    Hi,
    1. Create a Control (for Custom and Split Containers only)
    2. Instantiate a Container Object (in case of Custom and Split Containers, specify the control which is created by us in Screen painter) CREATE OBJECT
    3. Instantiate an Object of the kind of report that has to be displayed (List, Grid or Tree). CREATE OBJECT . Here we need to specify the Parent Container as the so that it sits in that container.
    4. Call appropriate methods to display the report on the screen. CALL METHOD ->
    DATA : g_dock TYPE REF TO cl_gui_docking_container,
    g_split TYPE REF TO cl_gui_easy_splitter_container,
    g_cont1 TYPE REF TO cl_gui_container,
    g_cont2 TYPE REF TO cl_gui_container,
    g_grid1 TYPE REF TO cl_gui_alv_grid,
    g_grid2 TYPE REF TO cl_gui_alv_grid.
    i_mara is an internal table of structure MARA
    SELECT * FROM mara INTO TABLE i_mara.
    i_kna1 is an internal table of structure KNA1
    SELECT * FROM kna1 INTO TABLE i_kna1.
    To create an Object of type Docking Container
    CREATE OBJECT g_dock
    EXPORTING
    side = cl_gui_docking_container=>dock_at_top
    extension = 200 .
    To Create an Object of Type Split Container. Here we can see that the Docking *Container Created above has been used as a parent .
    CREATE OBJECT g_split
    EXPORTING
    parent = g_dock
    orientation = 1 .
    Easy Split container splits one Control into 2 manageable controls, each of them is used * to handle one GUI Container each
    g_cont1 = g_split->top_left_container.
    g_cont2 = g_split->bottom_right_container.
    To Create an Object of type Grid . Here we can see that the Left Split Container * Created above has been used as a parent .
    CREATE OBJECT g_grid1
    EXPORTING
    i_parent = g_cont1 .
    To Create an Object of type Grid . Here we can see that the Right Split Container * Created above has been used as a parent .
    CREATE OBJECT g_grid2
    EXPORTING
    i_parent = g_cont2 .
    The method of Grid Control Object is used to display the Data.
    CALL METHOD g_grid1->set_table_for_first_display
    EXPORTING
    i_structure_name = 'MARA'
    CHANGING
    it_outtab = i_mara[] .
    The method of Grid Control Object is used to display the Data.
    CALL METHOD g_grid2->set_table_for_first_display
    EXPORTING
    i_structure_name = 'KNA1'
    CHANGING
    it_outtab = i_kna1[] .
    Regards
    Hari

  • How can we make a field confirm control compulsory field

    how can we make a field 'confirm control' compulsory field while creating a vendor code
    this field is under tab default data material tab while creating vendor code in purchasing org .part of vendor

    Hello,
    This can be done using the configuration..
    Go to Logistics - General >Business Partner>Vendors>Control>Define Account Groups and Field Selection (Vendor)--> and select the vendor group for which you want this field to be mandatory.
    Press details --> in the block "field status", double click Purchasing Plant and again double click Plant level purchasing data, in the second page (down), you can see the confirmation control key, that you have to make as req entry.
    If you want the conf control key to be mandatory for all the vendors groups, then you can do this by purchasing organisation level..that config node is just below this settings.
    Regards,
    Sakthi

  • How to make screen field enable when table control gives an error

    Hi,
        I had a scneario like when table control data wrong then one parameter of the screen should be enabled for the input, i knew that screen-name will not work since it will have always table control fields only when table control gives an error.
    How to make the other parameter enable when table control throws an error.
    Regards,
    Jaya

    Hi Gobi,
         Thanks for your response, but issue is - how to make other screen fields enable when there was an error in the table control data.
    For table control - lets say we will use the code as i mentioned above.i am sure that we cant write the code for field enable in between loop & endloop.
    as you said if we right outside the loop-endloop, the module wont be triggered when table control throws an error, because that statement was not there in the loop-endloop.
    please let me know if you need any more information on the issue. I hope there is alternative for this in SAP.
    Thanks
    Jaya

  • How to make users to select the date from calendar control my making the date field read only in date time control in external list in sharepoint 2010

    How to make users to select the date from calendar control only, by my making the date text field read only (don't want to let users type the date) in date time control in external list in sharepoint 2010. I am looking for a solution which can
    be done through sharepoint desginer / out of the box.
    thanks.

    Congratulate you got the solution by yourself. I am new to a
    WinForms calendar component, I feel so helpless on many problems even I'd read many tutorials. This question on the
    calendar date selection did me a great favor. Cheers.

  • How to make a restart of the workflow in a process controlled workflow?

    Hi Experts,
    How to make a restart of the workflow in case of process controlled workflow? Scenario is like this:
    The user has created a shopping cart with 1000 USD. The process schema has three process level with the first level being approval with completion.
    The first level being executed by the responsible purchaser. Here, the purchaser adds the source of supply and changes the price of the shopping cart 2000 USD and approve the shopping cart.
    Now, I want the approval task to start from beginning so that the requestor can know the changes and accept/reject the changes.
    Thanks and regards,
    Ranjan

    Hi,
    Restarting workflow goes to 1st level approval step. It is not requester.
    I think you need to set condition for "Acceptance by Contact Person" in Define Process Level.
    Regards,
    Masa

  • How to make use of customer reserve pricing types in copying control

    Hi All
    Please inform how to make use of 'customer reserve' pricing types like 'X,Y,Z & 1-9' keys in copying control.
    Right now I'm on maintenance & supporting project for european client.  They used pricing type 'Z' for copying condition records from stadard sales order to returns(RE) order.  I wanted to know that what is 'Z' and how it is functioning to resolve one urgent ticket assigned to me.
    Could you please guide me where should I verify its logic.
    Thanks & Regards
    Seshu

    Hi Seshu,
    Pricing type changes will done at user exit level. You may want to look at the user exit USEREXIT_PRICING_RULE (module pool SAPLV61A, program RV61AFZA)
    Also, OSS note 24832 will help you to get an understanding.
    Regards,
    Please reward points if helpful

Maybe you are looking for

  • Logic to get stock in hand.

    Hi All! What is the logic for the stcok in hand. There are several stocks like restricted stock,blocked stock,stock in quality inspection etc.. How can i get the total in hand Regards Praneeth

  • Re: Order in Process

    I've got the same problem too. Bought a Macbook Air at around 11am this morning, and 12 hours later, it is still at the order received stage. Checked my bank account, and saw that the money has already been deducted since this morning (ok, it was put

  • Having with more than one clause

    Hi Is posssible to have a query with more than one clause in having condition Example In my query I have Count , Sum and AVG , I need to use 3 conditions in having, Is It possible ? Thank you in advance

  • Using function module HR_READ_INFOTYPE

    Hi, I am fetching the data from PA0001,PA0002 and PA0105 using function module HR_READ_INFOTYPE.But when I am passing the prnr as 7 , it is getting changed to 7000 in the function module. Thats why it is not fetching the data.Please suggest why is it

  • Photos won't import in to iPhoto 9.6 (Yosemite) from iPhone

    Anybody seeing issues with importing photos in to the latest version of iPhoto 9.6 (910.29) from an iPhone (iOS 8.0.2)? Seems to get stuck on "Preparing to import".