Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » Splitter » Splitting a single ctrl (or appearing to)
Splitting a single ctrl (or appearing to) [message #41690] Fri, 10 January 2014 22:29 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
If I want to split one ArrayCtrl so that I can scroll one part and leave another part as is, how would I implement that please? I am thinking about how in Excel you can keep some data visible at the top while scrolling down.

Thanks for any help or suggestions.

Nick
Re: Splitting a single ctrl (or appearing to) [message #41704 is a reply to message #41690] Sun, 12 January 2014 10:22 Go to previous messageGo to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Actually I managed it by using two GridCtrl side by side using splitter. And on scroll I shift other control also. I wanted fixed columns.

FixedColGrid.sby.WhenAction = THISBACK ( Scroll );

void Scroll() {
int u1 = FixedColGrid.sby.Get();
ProcessGrid.sby.Set ( u1 );
}


Similar thing will be possible for vertical placement of two grids
using splitter.

Hope this may use useful.

Deepak


Warm Regards

Deepak
Re: Splitting a single ctrl (or appearing to) [message #41757 is a reply to message #41704] Fri, 17 January 2014 08:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
deep wrote on Sun, 12 January 2014 04:22

Actually I managed it by using two GridCtrl side by side using splitter. And on scroll I shift other control also. I wanted fixed columns.



The last I needed that for ArrayCtrl, I did the same.

The keys is to use WhenScroll and WhenData callbacks to synchronize, something like

ArrayCtrl left, right;
left.WhenScroll = left.WhenSel = THISBACK(LeftToRight);
right.WhenScroll = right.WhenSel = THISBACK(RightToLeft);

void MyApp::LeftToRight()
{
   right.SetCursor(left.GetCursor());
   right.ScrollTo(left.GetScroll());
}





Re: Splitting a single ctrl (or appearing to) [message #41760 is a reply to message #41757] Fri, 17 January 2014 17:23 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks.
Previous Topic: DHCtrl in SplitterForm
Next Topic: MayBe extend Styles of Splitter?
Goto Forum:
  


Current Time: Fri Mar 29 11:02:47 CET 2024

Total time taken to generate the page: 0.01732 seconds