• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 324
  • Last Modified:

Freezing Heading Related Panels

Hi experts  Within vb.net I am trying to recreate the appearance that you can get in Excel by using the "Freeze Panes" function using panels. That is i  have a form that contains a large panel that expands down and to the right.  The main panel has a column heading panel which should be fixed when only when scrolling downwards and a row heading panel that should be fixed when only when scrolling to the right. Is there a way to achieve this using panels.  I do not wish to use datagridviews.
0
staritsj
Asked:
staritsj
  • 7
  • 5
  • 2
1 Solution
 
Ajay SharmaCommented:
u can use something which persists itself always on top.
U can use  javascript to do this

http://www.hypergurl.com/messageontop.html
http://www.dynamicdrive.com/dynamicindex11/topcontent.htm
0
 
Bob LearnedCommented:
Are heading panels child controls on the main panel?

Bob
0
 
staritsjAuthor Commented:
This is a windows forms application. Is java script applicable?
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
Ajay SharmaCommented:
Opps  Sorry thought itz an ASp.net app.
0
 
staritsjAuthor Commented:
Hi Bob - Yes they are "inside" the main panel. Is that what you mean or is there a property that designates them child??
0
 
Bob LearnedCommented:
If there were placed outside of the main panel, they wouldn't move when the main panel was scrolled.  Child is when the panel's parent is not the form, but another control.  When the main panel is moved, do the other panels move with it?

Bob
0
 
staritsjAuthor Commented:
Sorry Bob I have probably not explained myself very well. I am sure i am missing something really basic in the way i have set up my panels. Can you tell me whether it is possible to achieve the following:

Within a tabcontrol using panels establish one panel to the far left that remains visible at all times however scrolls downward with the data. A second panel at the top of the tabcontrol that remains visible at all time and scrolls to the right with data. The best way to explain what i am after is say you open an excel spreadsheet and highlight cell "b3" and then select "Freeze panes". Type some data in cells A2 to A50 and also in the range A2:Z2. If I scroll to the right i can still see the "headings" in the range A2:A30 however the top heading now displays N2:Z2. The reverse then applies if i scroll down.  Like i said i am probably missing something very straightforward and I hope this all makes sense.
Cheers
0
 
Bob LearnedCommented:
How are you planning on achieving the cells without a grid?

Bob
0
 
staritsjAuthor Commented:
I was just using excel as an example of what i am trying to achieve. In my project the "data" is contained within text boxes in a panel that sits below the top heading panel and to the right of the "descriptions heading" panel.
0
 
Bob LearnedCommented:
Does the panel have all the TextBox controls for each heading?  

Bob
0
 
staritsjAuthor Commented:
Yes
0
 
Bob LearnedCommented:
Do you only want to freeze a certain portion of the headers, and scroll the rest?

Bob
0
 
staritsjAuthor Commented:
Hi Bob it is 1am over here so i am probably not thinking the best. I will have a re-think in the morning and see if i can make sense of it.

Thanks for your time so far.
0
 
staritsjAuthor Commented:
Bob - sorry i didn't get back to you sooner. I ended up synchronising the autoscrolls on seperate panels and this seems to work. I have awarded you the points for your time.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 7
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now