Forum Discussion

rlent's avatar
rlent
Contributor
14 years ago

Setting value of DevExpress Trackbar

I have a dialog with a DevExpress Trackbar. I want to set the value directly by code instead of dragging it, as this is more reliable. But when I click OK on the dialog, the changes don't stick. The Trackbar has wPosition, Value, EditValue and Text properties. I've tried changing them all, is there anything else I can do to make changes that will stick? If I drag the Trackbar, it works, but I want something more reliable than dragging.
  • Robert,


    As far as I understand, you are working with the Developer Express .NET Trackbar control. Right?


    I created a sample WinForms application using this control and tried to change the control's properties from TestComplete. EditValue and Text won't help as they are used for other purposes. wPosition and Value worked fine in my case.


    You said that changes of wPosition and Value properties don't stick when you click OK in the dialog.

    Could you clarify what you mean? As far as I understand, you drag the slider, close the dialog, then open it again, and the slider is in a wrong position. Try changing wPosition (or Value) and don't close the dialog. Does the tracker's position change in this case? Maybe your application does not save and/or restore the trackbar's position value?