Scrollbar handler

Discussion in 'Mac Programming' started by printf, Oct 5, 2008.

  1. printf macrumors regular

    Joined:
    Aug 27, 2008
    #1
    i'm creating a scrollbar at runtime using the following:

    Code:
    CreateScrollBarControl(window,&sb_vert_rect,0,0,100,50,true,ScrollingFeedbackProc,&sb);
    
    how do i capture scroll events in the handler for the window this control was created in? i've tried kEventClassControl, kEventControlClick with InstallControlEventHandler just to capture a click, but it only captures clicks in the window, not the scrollbar control.

    also, i'm using a compositing window with hiview.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Here is some code that may help: Creating a Scroll View. It uses the HIScrollViewCreate() function with subviews instead.
     

Share This Page