I'm trying to display a custom component i made inside a panel but when it renders the content is displayed outside of the panel box and there's no scrollbar.
In the designer i have this:
http://i.stack.imgur.com/V99pG.jpg
a panel
an instance of myComponent inside the panel
a button that calls a method on myComponent that adds some controls into it
When i run the application and press the button the following is displayed:
http://i.stack.imgur.com/wlDnV.jpg
See that the controls added dynamically in myComponent get over the panel's bottom line instead of showing only the visible part of the component and a scrollbar.
Any ideas how to fix it?
Thanks!
You should fix your component custom component height according to your panel if you are using text area in your component for displaying text then you should the text area size
I had your problem exactly gigkent. Turns out that it's to do with height settings. Apparently, setting the height to 100% is what messes it up.
I had an Accordion, a (several) NavigatorContent inside the accordion, a panel inside the navigator content, a scroller inside the panel with the scroller's viewport set to a VGroup declared outside all of that. The VGroup had clipAndEnableScrolling set to true.
Inside the VGroup, I had a form where I was dynamically adding radio buttons and my radio buttons were going off the screen. Setting the height of the VGroup to the height of the navigator content fixed the problem for me. I then had to set the width of the VGroup to the width of the Navigator Content -17 to compensate for the width of the scrollbar itself.
Here's the link that led me in the right direction.
http://www.actionscript.org/forums/showthread.php3?mode=hybrid&t=191108
Related
I need to change the default width and height of a dialog. I have tried in a way, that i have added two properties width, height to my dialog.But still not updated with the given width and height. Could you please suggest me?
Dialog width is 720px by default. To open a dialog in wide mode, set the wide property to true in the dialog definition. The dialog then uses all available horizontal space. The user can toggle between normal and wide modes by clicking the expand/collapse button in the top right corner.
Dialog height automatically adapts to fit the contents. You cannot set a fixed height. However, some form fields such as text and rich text allow you to set a height so you have some control over the height of the dialog.
I reimplement a QScrollArea and I want to add several widgets to it at runtime. The problem is, till the scrollbars are shown the content of the QScrollArea doesn't fit to it. Only if I add more widgets so the scrollbars shown the content fits correctly.
I already tried this after adding widgets
this->widget()->resize(this->widget()->sizeHint());
or
this->widget()->adjustSize();
But this doesn't worked. What I have to do to resize the content? Why the content fits after the scrollbars appear?
Add an appropriate layout to your scroll area before setting a widget.
Set the size constraints(min and max property ) of the widgets being added
I am not sure about your widget layout inside the scroll area, but you can make use of spacers to align the widgets ( when initially there are not many widgets to fill the scroll area for the scroll bar to appear)
I am having a popup page,in that page i have a select box, which i have applied jquery UI selectmenu. The problem is that the selectbox is in the bottom of the popup, and when it gets open, it get out of the popup limits.
My actual code (I cannot paste here my code for security reasons) has:
The z-index of of the select box is bigger compared to pop up container´s one, so its rendering on top of the pop up with no-issues.
The z-index for the select box is in relative with the pop up,not with the whole page,so the select box is hiding behind the pop-up when
the pop up height is less.
The desired behaviour is when popup height is less than needed to show all the select box. I need to show the select box without hiding.
If i did not apply jquery ui select menu, it´s working as expected.
Please find the below images for reference.
1.When having enoug popup size.
2.when popup size is less ,select is hiding.
3.What i am expecting.
Please suggest me what i can do to solve this.
Add CSS property overflow-y:visible on the main popup div:
This will make the inner content that is outside the main div top/bottom bounds to be rendered.
popupSelector {
overflow-y: visible;
}
Here is the documentation about overflow-y
I have a TextInput in a container. I need the horizontal scrolling capabilities of the container so that when the textInput is to big it allows me to scroll to see the text on the left and right. The scrollbar track and thumb were set to null so I can see the text.
trackSkin: ClassReference(null);
thumbUpSkin: ClassReference(null);
thumbOverSkin: ClassReference(null);
thumbDownSkin: ClassReference(null);
thumbSkin: ClassReference(null);
Now I want to listen to an event or watch a property that changes when the horizontal scrollbar activates. Then I would like to set a padding on the container or left and right property on the text input so that the left and right arrows do not get in the way of the user to see the first and last characters.
Thanks
Before adding listeners and accessing the HScrollBar of the Scroller, you may find this setting/variable of some use: measuredSizeIncludesScrollBars
From the API: (Please forgive the terrible formatting)
If true, the Scroller's measured size includes the space required for the visible scroll bars, otherwise the Scroller's measured size depends only on its viewport.
Components like TextArea, which "reflow" their contents to fit the available width or height may use this property to stabilize their measured size. By default a TextArea's is defined by its widthInChars and heightInChars properties and in many applications it's preferable for the measured size to remain constant, event when scroll bars are displayed by the TextArea skin's Scroller.
In components where the content does not reflow, like a typical List's items, the default behavior is preferable because it makes it less likely that the component's content will be obscured by a scroll bar.
In the event this doesn't work, I would probably add an event listener attached to the lifecycle of the Scroller. During that event handling, I would check to see if the Scrollbar was null or not. If it wasn't, I would store it off to the side, but not before adding a listener to its "show" and "hide" event. That way, you can kick off whatever you need to whenever the scrollbar changes its state.
I have a Flex application, I want to scroll the page to bottom when a button is pressed.
Scroll bars is added by browser, they do not belong to flex app or component.
I can do this by javascript but is there a way to do this with action script?
Thanks.
Enes
The Container class has a verticalScrollPosition and a maxVerticalScrollPosition. If you set the former to the latter you will scroll the container to the bottom.