Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > OOP Powerplant for Mac > Live Scrolling ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 450 of 483
Post > Topic >>

Live Scrolling Using LScrollBar

by "Neel" <nilesh_ibmr@[EMAIL PROTECTED] > Apr 6, 2006 at 07:02 AM

Hi,
I am trying to implement Live Scrolling using LScrollBar in
CAppearanceApp. I have a Pane  LScrollBar inside LView. I draw a graph
inside a Pane, and wanted to scroll that graph using LScrollBar. I did
set Kind = Live Scrolling in Constructor. But could not trap the event
when user scroll the thumb using small side arrows constantly without
moving anywhere of LScrollBar. I did get event when user click on
aynwhere in scrollbar but could not scroll the graph when user
constantly push the arrow keys...( i.e. Live Scrolling). Please have a
look at snippet of code and suggest what should i do to implement live
scrolling.

/*******************************************************************************/
 case msg_ScrollAction:
{
LScrollBar::SScrollMessage *l_pSScrollMessage =
static_cast<LScrollBar::SScrollMessage*>(f_pParam);

		int l_nMin = l_pSScrollMessage->scrollBar->GetMinValue();
		int l_nMax = l_pSScrollMessage->scrollBar->GetMaxValue();
		int l_nVal = l_pSScrollMessage->value;
		int l_nImd;
				switch(l_pSScrollMessage->hotSpot)
				{
					case kControlUpButtonPart:
						l_nVal--;
						break;
					case kControlDownButtonPart:
						l_nVal++;
						break;
					case kControlPageUpPart:
						l_nImd = l_nMax / 20;
						if(l_nImd <= 0) l_nImd = 1;
						l_nVal -= l_nImd;
						break;
					case kControlPageDownPart:
						l_nImd = l_nMax / 20;
						if(l_nImd <= 0) l_nImd = 1;
						l_nVal += l_nImd;
						break;
					case kControlIndicatorPart:
					{
						m_bRedrawGraph = true;
						m_nRedrawGraphValue = l_nVal;
					}
					break;
				}
				if(l_nVal < l_nMin) l_nVal = l_nMin;
				if(l_nVal > l_nMax) l_nVal = l_nMax;
				if(l_nVal != l_pSScrollMessage->value)
				{
					l_pSScrollMessage->scrollBar->SetValue(l_nVal);
					RefreshGraph(l_nVal);
				}
				break;
			}
		case msg_ThumbDragged:
		case msg_ControlClicked:
		case SR_GRAPH_SCROLL:
			RefreshGraph();
			break;

/**************************************************************************************************/
Thanks in advance.

Neel.
 




 2 Posts in Topic:
Live Scrolling Using LScrollBar
"Neel" <nile  2006-04-06 07:02:41 
Re: Live Scrolling Using LScrollBar
David Phillip Oster <o  2006-04-07 02:09:23 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:17:35 CDT 2008.