![]() |
problem in slider Appearance |
Post Reply ![]() |
Author | ||
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() Posted: 10 July 2008 at 1:39am |
|
Hello,
CXTPRibbonGroup* pGroupColorCorrect = pTab->AddGroup(_T("ColorCorrectGroup"));CXTPControlScrollBar* pSliderBlurSharp = (CXTPControlScrollBar*)pGroupColorCorrect->Add( new CXTPControlScrollBar(), ID_SLIDER_BLUR_SHARP);pSliderBlurSharp->SetScrollBarStyle(xtpScrollStyleSlider);pSliderBlurSharp->SetRange(-75,75);pSliderBlurSharp->SetPos(50);//pSliderBlurSharp->SetFlags(xtpFlagNoMovable | xtpFlagSkipFocus); pSliderBlurSharp->SetFlags(xtpFlagSkipFocus); pSliderBlurSharp->SetWidth(150);pSliderBlurSharp->SetHeight(10);pSliderBlurSharp->SetTooltip(_T("Blur<--->Sharp"));i created one slider using above code.But the sliding icon is not appearing on it.Please tell me what is the solution for this.you can see for first slider there is no sliding icon. please give the solution for this problem. Thanks And Regards,
Vijay.
|
||
![]() |
||
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
its disabled. You need enable it to add update handler for ID_SLIDER_BLUR_SHARP command or
pSliderBlurSharp->SetFlags(xtpFlagManualUpdate);
pSliderBlurSharp->SetEnabled(TRUE);
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
|
Thanks a lot for your reply.Lot of my work was pending because of this.Thanks again.
But now one new problem i am facing,if i click on ' + ' sign,the moving tab on slider moves properly,but if i click on ' - ' sign the moving tab doesnt move anywhere.it directly moves to 0 position when i click on ' - ' sign.
I tried many combinations of setrange() function,but unfortunately nothing worked.
Please guide me why the slider tab not moving properly.
Thanks And Regards,
Vijay
|
||
![]() |
||
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
Right. now its our issue. :(
Slider always use "0" as minimum. Please use range 0 - 150 instead and manually convert it (Value - 75) in Execute event.
|
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
||
Simon HB9DRV ![]() Senior Member ![]() ![]() Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
![]() ![]() ![]() ![]() ![]() |
|
Oleg, how can I create a slider with this appearance on a toolbar? I can't find any examples :-(
|
||
Simon HB9DRV
|
||
![]() |
||
Simon HB9DRV ![]() Senior Member ![]() ![]() Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
![]() ![]() ![]() ![]() ![]() |
|
SetScrollBarStyle(xtpScrollStyleSlider); !!!
|
||
Simon HB9DRV
|
||
![]() |
||
vijaymahajan ![]() Groupie ![]() ![]() Joined: 16 June 2008 Status: Offline Points: 92 |
![]() ![]() ![]() ![]() ![]() |
|
Hello, if i handle the event of slider using ON_XTP_EXCECUTE(),then how can i check the SB_ENDSCROLL condition as i want to do something once the scroll ends. Please guide me accordingly. Thanks And Regards, Vijay. |
||
![]() |
||
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
|
with XTP_EXECUTE you can't... Solution is override CXTPControlScrollBar and its void CXTPControlScrollBar::OnScroll(UINT nSBCode, UINT nPos) method and add own code.
Original code:
void CXTPControlScrollBar::OnScroll(UINT nSBCode, UINT nPos) { int nCurPos = GetPos(); switch (nSBCode)
{ case SB_TOP: nCurPos = m_nMin; break; case SB_BOTTOM: nCurPos = m_nMax; break; case SB_LINEUP: nCurPos = max(nCurPos - 1, m_nMin); break;
case SB_LINEDOWN: nCurPos = min(nCurPos + 1, m_nMax); break; case SB_THUMBTRACK: nCurPos = nPos; break;
case SB_PAGEUP: nCurPos = max(nCurPos - m_nMax / 10, m_nMin); break; case SB_PAGEDOWN: nCurPos = min(nCurPos + m_nMax / 10, m_nMax); break; } if (nCurPos == m_nPos)
return; m_nPos = nCurPos;
RedrawParent(FALSE); NotifySite(CBN_XTP_EXECUTE);
} |
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |