Fltk how to modify slider title when slider changed?

Hello,
I wanna show the VALUE of the slider in the title.
But did not have success.

Sorry I am noob!

let mut slider = Slider::new(30, 110, 20, 50, "WPM: ");
slider.set_range(5.0, 40.0);
slider.set_value(25.0);
slider.set_tooltip("adjust WPM (Words per minute)");

if slider.changed() {
slider.set_label(&format!("WPM: {}", slider.value() as i32));
}

How to do it right ?

You might get better feedback here, if you’d

  1. Use a translation tool, such as `deepl` if you don’t speak English well.
  2. Put more information about the actual problem in your posts, such as the expected and actual results as well as potential error messages.
  3. Provide an MRE so that others can reproduce your issue at hand.