TMSFMXSpinner: set and get value C++

Hi,

I wonder how it is possible to set and get the value of a Spinner.

Get the present selected value of a spinner:
value=Spinner->Columns[0]. ?

Set spinner at a value ( scroll to value ):
Spinner->Columns[0]. ?  = value;

Hi, 


To get and set the selected value, please use Spinner->Columns[0].SelectedValue

Kind Regards, 
Pieter

This was tried before this question - SetValue is not member of TMSFXXColumns - using the code in?sight SetValue is not on the list either. Windows 32 bit.

Spinner->Columns[0].SelectedValue; gives:  "SelectedValue is not a member of TTMSFMXColumns"

The correct code is:


  TMSFMXSpinner1->Columns->Items[0]->SelectedValue = 10;

Thanks ! The Spinner is a great component with many possibilities. I have some  ore questions:

1) How to "clear" a column for items ?
2) How to add a new item to a column, in this case text ?
3) Which will probably involve adding a new item to the list.

The items in a column is constructed with the RangeFrom / RangeTo and the RangeType properties.

When the RangeType is set to srtCustom, you can add text items to the custom items collection

  TMSFMXSpinner1->Columns->Items[0]->RangeType = srtCustom;
  TMSFMXSpinner1->Columns->Items[0]->CustomItems->Add();

Kind Regards, 
Pieter

Thanks a lot Pieter,

One  more question - how to change the width of a Column, having columns with different widths - this seems not possible in FMX ?

I actually found the answer, to disable autosize in the submenu ;-)