[comp.sys.mac.programmer] Dialog Boxes with Scrollable region

lipsett@inmet.UUCP (03/21/88)

I am trying to build a dialog box with a scrollable region embedded in
it, similar to the SF Getfile box or the MS Word help box.  It all
looked so straightforward...just create a UserItem and do the obvious
thing.

The catch is that ModalDialog does not give you any information about
the event - only the item number of the hit on a mouse click.  So
there seems no way to actually find out that the scroll bar was
clicked upon rather than the textual portion of the item.  One hack is
to use a filter function to ModalDialog to save the coordinates of
each mouse click.  This would presumably work, but it still does not
allow you to do continuous scrolling in the [page|line][up|down]
regions.  Also, this is an incredible hack.  I can't believe it is the
right way to do it.

So, what obvious thing am I missing?  Please reply by E-mail; I will
summarize for the net if there are enough responses.  Thanks in
advance.

Roger Lipsett
{ihnp4,mirror,sun}!inmet!lipsett

dwb@Apple.COM (David W. Berry) (03/29/88)

In article <170800002@inmet> lipsett@inmet.UUCP writes:
>
>
>I am trying to build a dialog box with a scrollable region embedded in
>it, similar to the SF Getfile box or the MS Word help box.  It all
>looked so straightforward...just create a UserItem and do the obvious
>thing.
>
>So, what obvious thing am I missing?  Please reply by E-mail; I will
>summarize for the net if there are enough responses.  Thanks in
>advance.
	The solution, perhaps not obvious, is to go ahead and use
a filter proc.  The filter proc gets the event and can do a FindControl
to determine if it's in the scroll bar or not.  If it is, call TrackControl
as appropriate, remembering that thumbs and other parts work differently.
>
>Roger Lipsett
>{ihnp4,mirror,sun}!inmet!lipsett


David W. Berry
dwb@Delphi	dwb@apple.com	973-5168@408.MaBell
Disclaimer: Apple doesn't even know I have an opinion and certainly
	wouldn't want if they did.
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
::: Fodder for the heinous line counter :::
-- 
David W. Berry
dwb@Delphi	dwb@apple.com	973-5168@408.MaBell
Disclaimer: Apple doesn't even know I have an opinion and certainly
	wouldn't want if they did.