|
|
Home » U++ Library support » Slider&ProgressIndicator » Slider with thermometer like scale
|
|
|
|
|
|
|
Re: Slider with thermometer like scale [message #28208 is a reply to message #27646] |
Mon, 23 August 2010 10:52   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Hi Koldo
I have done as you suggested. There are some places where I need to improve -
1 - how to set CONTROL or INDICATOR from USC code.
2 - in SlideSw, I am unable to set the value on the slidesw indicator when clicking on the slidesw control away from the thumb. If I click and move the thumb the indicator updates correctly.
3 - how to set the vector of Names from either USC or code. Right now, I am doing it right inside the control which is not desirable.
The controls in the file are JFSlider, SlideSw, JFStaticText and MyMeter. The last one of course is specific to my requirement, but, I let it remain in the group. Later I can plan to gather all the USC code into 1 file. Is there any more details on ESC script than what is in the documentation; it seems quite lacking in detail. Things like enum_property, >Ctrl, Frame frame @1; do not make sense at all and do not seem to appear in the docs.
Thanks for your help
[Updated on: Mon, 23 August 2010 11:19] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Slider with thermometer like scale [message #28979 is a reply to message #28977] |
Thu, 30 September 2010 08:36   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Quote: | - Click outside the thumb, there is a fn Jump(), call Jump( true ) to get the behavior you are requesting.
|
Great! 
Quote: | - user defined formatting fn, this sounds like a great idea. So it would be a virtual fn I guess? Or is there a better way?
|
I prefer a Callback, because:
- If it is used a virtual function
-- You need to create a derived new class
--- So in the layout designer you get an empty box instead of a nice widget 
To see an example, go to Scatter package, cbModifFormatX.
For example:
graph.LabelFormat = THISBACK(MyFormatFunction);
...
void MyClass::MyFormatFunction(String &s, int val) {
int min = int(val/60);
int secs = val - 60*min;
s = Format("%02d:%02d", min, sec);
}
Quote: | - I don't know much about .usc files, but I will try, can you point me to some information?
- Your idea to better use the space is a good one. I will look into this as well.
|
I would remove before the slider spacing. After that I would go to .usc, as usc will copy original C++ code as much as possible.
Best regards
Iñaki
|
|
|
Goto Forum:
Current Time: Sun Apr 27 00:16:37 CEST 2025
Total time taken to generate the page: 0.03803 seconds
|
|
|