|
|
Home » Developing U++ » UppHub » Knob control
|
|
Re: Knob control [message #27959 is a reply to message #27954] |
Thu, 12 August 2010 08:13   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Quote: | I'm not sure if you can add fine marks between the major marks. Could be set to 0 if a person does not want them.
|
No problem .
Two questions:
- How would you call the marks between major marks?
- How would you call the mark locking knob behavior?
Best regards
Iñaki
[Updated on: Thu, 12 August 2010 08:25] Report message to a moderator
|
|
|
Re: Knob control [message #27963 is a reply to message #27959] |
Thu, 12 August 2010 10:11   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
koldo wrote on Thu, 12 August 2010 11:43 |
Two questions:
- How would you call the marks between major marks?
- How would you call the mark locking knob behavior?
|
I am thinking more in terms of the slider code I just modified. In that code, the ticks are marked for every minorticks and thick one for every majorticks. The increment is by minorticks.
The knob locks on to minortick increments. Majorticks is just a special case of minorticks as I see it.
This is the relevant part of that code
// draw gradations
for( int i = Min();
( m_nMajorTicks > 0 ) && ( i <= Max() ) ;
i += ( m_nMinorTicks == 0 ? m_nMajorTicks : m_nMinorTicks ) ) {
int nPos = SliderToClient( i );
if( ( m_nMajorTicks != 0 ) && ( i % m_nMajorTicks ) == 0 )
DrawTick( w, MAJOR, (HOVE)HoVe( HORZ, VERT ), nPos, i );
else if( ( m_nMinorTicks != 0 ) && ( i % m_nMinorTicks ) == 0 )
DrawTick( w, MINOR, (HOVE)HoVe( HORZ, VERT ), nPos, i );
}
Regards
|
|
|
Re: Knob control [message #27965 is a reply to message #27963] |
Thu, 12 August 2010 10:23   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Quote: | the ticks are marked for every minorticks and thick one for every majorticks. The increment is by minorticks.
| Ok
A question: The Knob sensibility and behavior when using it with mouse and keyboard is right for you?. When selected and/or clicked it changes slightly its shape.
Best regards
Iñaki
[Updated on: Thu, 12 August 2010 10:25] Report message to a moderator
|
|
|
|
|
|
Re: Knob control [message #28060 is a reply to message #27950] |
Sat, 14 August 2010 04:04   |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |

|
|
Hi Koldo
This looks very good. Thank you
Since it is a work in progress, I guess, the USC does not link to the knob properly and I get errors if I try to SetFineTicks(IIRC) and some other parameters too.
Regards
[Updated on: Sat, 14 August 2010 05:09] Report message to a moderator
|
|
|
|
|
|
|
Re: Knob control [message #28115 is a reply to message #28114] |
Tue, 17 August 2010 10:36   |
|
Hi Koldo!
Respect man I remember doing usc paint for GridCtrl.. Esc language is ok but the main trouble is you have to write paint code twice and then maintain it. It would be great if it was possible to use real widgets in designer. I guess FormEditor follows this way.
|
|
|
|
|
Re: Knob control [message #28124 is a reply to message #28118] |
Tue, 17 August 2010 18:22   |
|
Hi,
I apologize for engaging into slightly off-topic discussion, but I couldn't help it 
unodgs wrote on Tue, 17 August 2010 10:36 | It would be great if it was possible to use real widgets in designer. I guess FormEditor follows this way.
|
Unfortunately FormEditor can AFAIK use only widgets that are compiled in. Compiling theide every time you change something in a widget would be tedious. That might or might not be solvable in the future using some plugin-like solution to let the widget to be compiled separately. But in the meantime, I guess it should not be that hard to learn Esc how to use Painter, at least the basic functions.
koldo wrote on Tue, 17 August 2010 16:01 | Meanwhile I strongly encourage all contributors to:
- Use Painter
Visual experience is much better
- Create .usc widgets for your classes
If a visual class is not in .usc, it does not exist
|
I strongly agree with both and join your encouragement 
Best regards,
Honza
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 18:10:23 CEST 2025
Total time taken to generate the page: 0.00895 seconds
|
|
|