Home » Developing U++ » UppHub » Knob control
Re: Knob control [message #28137 is a reply to message #27950] |
Wed, 18 August 2010 15:00 |
jerson
Messages: 202 Registered: June 2010 Location: Bombay, India
|
Experienced Member |
|
|
Hi Koldo
I think I caught some bugs on the knob USC. SetMajorMarks to 3, SetMinorMarks to 4 and the widget display is wrong. However, the CPP paint does its job well. Same way, set SetMajorMarks to 4, SetMinorMarks to 5 and the USC code crashes.
Another minor suggestion, I would define major and minor marks differently like this; but, that's my opinion.
MajorTickInterval and MinorTickInterval so user can decide the tick interval in terms of a quantum of the range. MajorTickinterval of 25 means a major tick every 25 counts of the range and minortick of 5 means a dot every 5 counts of the range
I've done something like that in the slider.cpp file I uploaded on the slider thermometer thread.
this is the relevant paint 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 );
}
Best Regards
|
|
|
|
|
Knob control
By: koldo on Wed, 11 August 2010 22:30
|
|
|
Re: Knob control
By: jerson on Thu, 12 August 2010 02:44
|
|
|
Re: Knob control
By: koldo on Thu, 12 August 2010 08:13
|
|
|
Re: Knob control
By: jerson on Thu, 12 August 2010 10:11
|
|
|
Re: Knob control
By: koldo on Thu, 12 August 2010 10:23
|
|
|
Re: Knob control
By: jerson on Thu, 12 August 2010 13:29
|
|
|
Re: Knob control
By: jerson on Fri, 13 August 2010 06:29
|
|
|
Re: Knob control
By: koldo on Sat, 14 August 2010 01:55
|
|
|
Re: Knob control
By: jerson on Sat, 14 August 2010 04:04
|
|
|
Re: Knob control
By: koldo on Sat, 14 August 2010 16:09
|
|
|
Re: Knob control
By: jerson on Sat, 14 August 2010 16:58
|
|
|
Re: Knob control
By: koldo on Sat, 14 August 2010 21:10
|
|
|
Re: Knob control
By: koldo on Tue, 17 August 2010 10:10
|
|
|
Re: Knob control
By: unodgs on Tue, 17 August 2010 10:36
|
|
|
Re: Knob control
By: koldo on Tue, 17 August 2010 16:01
|
|
|
Re: Knob control
|
|
|
Re: Knob control
By: koldo on Tue, 17 August 2010 21:17
|
|
|
Re: Knob control
By: jerson on Tue, 17 August 2010 14:16
|
|
|
Re: Knob control
By: jerson on Wed, 18 August 2010 03:30
|
|
|
Re: Knob control
By: koldo on Wed, 18 August 2010 08:15
|
|
|
Re: Knob control
By: jerson on Wed, 18 August 2010 15:00
|
|
|
Re: Knob control
By: koldo on Wed, 18 August 2010 17:01
|
|
|
Re: Knob control
By: jerson on Wed, 18 August 2010 17:09
|
|
|
Re: Knob control
By: koldo on Wed, 18 August 2010 22:27
|
|
|
Re: Knob control
By: koldo on Thu, 19 August 2010 23:17
|
|
|
Re: Knob control
By: jerson on Fri, 20 August 2010 03:22
|
Goto Forum:
Current Time: Fri May 10 16:01:56 CEST 2024
Total time taken to generate the page: 0.02082 seconds
|