FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour New class KNob
Posts: 7335
Joined: Thu Oct 18, 2012 07:17 PM

New class KNob

Posted: Tue May 12, 2026 11:33 PM

I created a new custom control for FiveWin/Harbour called TKnob.

It is a modern rotary knob control designed mainly for audio, MIDI and synthesizer style applications.

Main features:

LED or LINE indicator
Bipolar and Unipolar modes
External illuminated ring with glow effect
Optional ticks
Mouse drag and mouse wheel support
CTRL for smooth wheel movement
Double click reset to default value
Enable/disable state with visual feedback
Internal value display
Separate fonts for label and internal value
Themed/transparent background support

Clarifications

It's not a copy of Ramon Avendano's tselector class. Ramon uses C++ to build the object control, but I use pure FiveWin. I need it for the new music project I'm doing with a piano, drumpad, sequencer, tracks, and an audio mixer. I'm trying to create something more professional than a simple selector wheel.

sample of syntax

@ 35, 40 KNOB oKnobVol ;
      VAR nVol ;
      OF oDlg ;
      SIZE 76, 86 ;
      LABEL "VOL" ;
      MIN -30 ;
      MAX 30 ;
      LED ;
      BIPOLAR ;
      FONT oFont ;
      FONTINNER oFontInner ;
      NOTICKS ;
      ON CHANGE { | o, n | oSayVol:SetText( "VOL: " + AllTrim( Str( n ) ) ) }

   @ 35, 370 SAY oSayMod ;
      PROMPT "MOD: " + AllTrim( Str( nMod ) ) ;
      SIZE 50, 10 ;
      PIXEL ;
      OF oDlg
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion