Display NSSlider ToolTip Continuously While Dragging Slider?

Discussion in 'Mac Programming' started by Darkroom, Oct 21, 2008.

  1. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    is it possible?

    Code:
    - (IBAction)swatchSizeChange:(id)sender
    	{
    	[swatchDragSizeSlider setToolTip:[NSString stringWithFormat:@"%i",[sender intValue]]];
    	}
    with the code above i have the current location of the slider displaying as its tooltip, but it would be a million times better if it's possible to show the tooltip while the slider is moving. i'm hoping this is possible. i couldn't find anything in the documentation.

    [EDIT] sorry, i meant to write "but it would be a million times better if it's possible to show the tooltip visible and updating while the slider is moving" if my intention wasn't clear...
     
  2. Sayer macrumors 6502a

    Sayer

    Joined:
    Jan 4, 2002
    Location:
    Austin, TX
    #2
    That is not the purpose of a tool tip. A slider's value should always be apparent, so put a static string next to it and update it as the slider's value changes.

    Or make your own control where the value is part of the slider "thumb" like in Photoshop and other apps with lots of sliders.
     
  3. Darkroom thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #3
    ok... you're right... so that is what i have done...

    thanks.
     

Share This Page