I have a panel (Ext.Panel) with autoScroll = true. How to get the width of hidden area or get coordinates of point at panel in terms of scrollable space? For example, panel scrolled to the right. I need solution for ExtJs 3.4, but answers for ExtJs 4 will be interesting too.
In the case of a panel, the body is the scrolled element, so you'd need:
panel.body.dom.scrollWidth;
Related
I'm using a winform. When I set the width to a little too small, or user adjusts my form width, some of my controls are getting cut off. The behavior that I'm looking for is a horizontal scroll bar appearing in this situation.
The issue is with the top panel of my form. This is my setup.
I have a panel - Dock = Top
In it, I have one panel (pnlHeaderLeft) - Dock = Left and another panel (pnlHeaderRight) - Dock = Right
In pnlHeaderLeft, I have a drop down and 2 buttons with anchor = top, left.
In pnlHeaderRight, I have a devex layout control with Dock=fill.
Can an expert pls assist?
I am trying to establish the following behavior: When hiding the bottom (blue) panel I want the top (red) panel to stretch to replace it vertically and vice versa (hiding red panel should expand blue).
Using a table layout panel with auto sized rows I was able to get the blue to stretch upwards but I can not get the red panel to grow downwards.
It's difficult to see from the far right picture but the bottom table row did not shrink with the panel. Table layout panel is not a requirement for me but I was hoping it would offer a solution.
Try using a SplitContainer control instead.
You can control each panel's visibility with the Collapsed properties:
splitContainer1.Panel1Collapsed = true;
or
splitContainer1.Panel2Collapsed = true;
I have a grid panel with some data, when ever grid rows exceeds i.e, if the data is more n grid height is small scroll bar ll come . I want to change the style of that scroll bar. I tried following css :
.x-box-scroller
.x-scroller-vertical
But no changes in scroll bar width n style.
pls someone let me know the correct way to change the Extjs4 scroll bar width and color
Thanks
The Scrollbar is rendered by the browser and not by ExtJS. The Framework just makes some space for it. Asking your Question as you did can only be answered with no
Scrollbar CSS styles are an oddity invented by Microsoft developers.
They are not part of the W3C standard for CSS and therefore most
browsers just ignore them.
this might interest you stackoverflow.com/questions/7725652
I am using ExtJS 3.3
I have a main panel containing another panel (containing text) and a grid containing data with a paging toolbar and footer.
There is a zoom control (a combo with values like "100%, "50%", "page width","whole page" ) on the paging toolbar.
I wish to select a zoom level from the combo and have everything on the main panel resize to that zoom level.
I need all other panels on the page to appear unchanged in size.
I have Googled around but cannot see any solutions or extensions available.
How can I do this please? Any ideas?
You should be able to do this using CSS to define the size of each element at each required zoom level. Your combo zoom control would need to have an event handler which would switch the class of the (probably) DIV element which contains the content you want to resize.
There is a StackOverflow question here which is a useful discussion about some ways to acheive the scaling; there are many ways to do it and your choice depends on what you need to acheive. If you provide sight of the display or code you're working on then I could probably make some recommendations.
I have a simple dialog with tab control whit property Dock = Fill. On the tab page I add another control and set its properties Anchor as 'Left, Top, Right' and min size as '600,300' for example. I set the property of tab page AutoScrolling to true.
But when I resize the dialog the horizontal scrolling of the tab page doesn't work when the dialog width is smaller than min width of the chield control.
Why horizontal scrolling doesn't work in this case? Is it bug or maybe feature?
Thanks a lot!
I can't even get the scrollbar to show up. Right/bottom anchors don't work well when auto-sizing layout. Set the AutoScrollMinSize property to an appropriate value, that also ensures you've got enough margin to the right of the button.
It's because of the Anchor. You anchored it on the left and right which means that it will have no minimum width, its width is determined by its container's size.
What is the effect you're trying to achive?