GetSliderControl

>>-anAdvancedControl~GetSliderControl(--id--+-------------+--)-><
                                            +-,--category-+


The GetSliderControl method returns an object of the SliderControl class that is assigned to the track bar with the specified ID. The SliderControl class (see SliderControl Class) provides methods to query and manipulate track bars.

Arguments:

The arguments are:

id

The ID of the track bar.

category

The number of the category dialog page containing the requested track bar. This argument must only be specified for category dialogs.

Return value:

An object of the SliderControl class or .Nil if the requested track bar does not exist.

Example:

The following example initializes track bar 103:

::class MyDlgClass subclass UserDialog inherit AdvancedControls

::method InitTheSlider
  sl = self~GetSliderControl(103)
  if sl == .Nil then return
  no = 0; yes = 1
  sl~ClearSelRange(no)
  sl~SetMax(200,no)
  sl~SetTickFrequency(50)
  sl~SetTickAt(75)
  sl~SetSelStart(20, no)
  sl~SetSelEnd(180, yes)
  sl~Pos = 167

Note: GetSliderControl connects an Object Rexx object with a Windows object. If the object does not exist, the Nil object is returned. Therefore, this method can only be applied after the Windows dialog has been created (after the invocation of StartIt).