I put a trackbar beside a photograph of the radiator. Min is 60, Max is 80, and Position is 80. Everyone still has a coat on.
Should this be a TScrollBar? I need the heat to go up, and the trackbar seems interested only in moving sideways. There is no cable to the radiator because I assumed Anchors handled that.
Re: TTrackBar moves to 80 but the office remains cold
A TTrackBar selects a numeric value. It does not connect to a thermostat. Anchors controls how an on-screen control follows changes in its parent's size.
For a working display of the requested setting, keep the range you chose and use this helper from the trackbar's OnChange handler. Call it once during setup as well. It uses ComCtrls, StdCtrls, and SysUtils:
pascal
procedure ShowRequestedTemperature(Slider: TTrackBar; Readout: TLabel);begin
Readout.Caption := IntToStr(Slider.Position)+' F requested';end;
Pass the trackbar and a label. This displays the request. To control an actual thermostat, the program also needs that device's supported communication interface and code to send the setting. Display any measured temperature separately, using a real reading from the device. A request is not a measurement.
The TTrackBar properties describe its range, position, and orientation. A vertical orientation changes how the slider is drawn, not which way heat travels.
Re: TTrackBar moves to 80 but the office remains cold