hbox scrollbar is not showing - flex4

i need to put a horizontal scrollbar in a dynamically created Hbox. im writting the code like this:
hbxWallAImg = new HBox();
hbxWallAImg.horizontalScrollPolicy="on";
but still the no scrollbar is comming.
i have tried by setStyle also. but it is also not working.

The scroll bar will not be visible unless the content of the box doesn't fit in the box's view port. So just by setting the scroll policy, it won't be displayed, but rather when the element will "know" that in case its content doesn't fit, it should display scroll bars. You also need to add some children and dimensions (with, height) to the HBox.
Without dimensions, it will "stretch" as much as it needs to accommodate the content, so no scroll bars will be visible in this case also.
You can find all the info about view ports and scrolling in Flex 4 here: http://www.adobe.com/devnet/flex/articles/flex4_viewport_scrolling.html
Hope this helps.
Have a good day,
Romi

Related

How do you update all the TreeView items full area when the vertical scrollbar shows up or goes away?

I am using NM_CUSTOMDRAW to draw tree view items. My items right justify parts of it by using a right margin based on the RECT area reported available. The issue I have is that when the vertical scrollbar appears or disappears, only the item expanded/collapsed and the area under the scrollbar seems to update (invalidated regions). This causes the repaint requests (with the new width) to not update the area correctly.
For example (using text and a single space as example): You could have something with the scrollbar be right justified text ## where ## is the scrollbar then when the scrollbar goes away you end up with right justified text t instead of right justified text
Is there a good way to fix this?
One thought is if I could catch a message when a scrollbar shows up or goes away, I could just invalidate the window to force a redraw. Is there such a message?
Or is there a way to add to the invalidated region without triggering a redraw loop but would update the full items area?
Another thought is I can just use the full window RECT size and use a right margin large enough that wouldn't be under the scroll area but I'd rather not do that.
Thanks!

How to make sure groupbox always fit in the screen?

I am trying to create app. In the form, there is only 3 button in a groupbox. I want to make the groupbox always fit in the screen. The problem is when i minimize the form, there is vertical and horizontal scroll. So i cannot see the whole groupbox border:
I want to make the groupbox to minimize without the scroll and i am able to see all the border just like when in the maximize screen as below:
I have already tried groupbox autosize to true while anchor to top, bottom, right, and left but it is still not working. Any idea how i can achieve this?
As #ib11 said you need to go to Dock and select Fill. In addition, if you want to make your group box not fill the form but grow with it, you'll probably need to change the Anchor to all sides. That's why your previous settings didn't work because anchor doesn't fill the screen, it's just a property to grow with the screen. Fill makes it possible so that you can have a group box or any other control always fill the screen.
See this image for dock:
See this image for anchor:
You need to set the Dock property of the GroupBox to Fill.
Like so:

HOw to get rid of vertical "overflow:hidden" in Slick Slider

All. I am emboding the Online Store PSD design to HTML/CSS. Here is link.
There is an items slider in items page. Every item has configuration icons in the bottom of the it. When you hover on the item, second row of icons appear. Every configuration icon has its tooltip on hover. Let me describe the problem. Now because of Slick slider 'overflow:hidden' property on 'slick-list' block, the second row of icon is not visible fully. BEsides, tooltips are also being trimmed. If If I delete 'overflow:hidden', this problems disappear. But another problem appears. That is, now all slides are visible horizontally which are out of bound. If you visit the site, you notice in the bottom of the page 2 sliders. The second one has no 'overflow:hidden'. Therefore, everything is visible. But it is not good. If users monitor has high density, it looks very ugly. The first slider is by default. It has 'overflow-hidden' property , therefore everything out of bound is trimmed. I need only get rid of vertical 'overflow:hidden'. Is this possible? Thanks much, in advance.
enter image description here

Receive touch events after settings StackLayout.TranslateX property

I have a ContentView with a StackLayout with multiple children sized to the full width of the screen. In other words, if the screen width is 320 and I have five children, the inner StackLayout is resized to 1600.
In this ContentView, I have Next and Previous buttons that when clicked, animate the inner StackLayout's TranslateX property. Basically, I'm creating a carousel by translating the StackLayout within the ContentView. I chose this route because I was having layout issues using a ScrollView and a custom renderer when I would modify that layout of the view (by hiding labels, etc.)
However, I've hit a snag. Content that appears after I set the TranslateX property doesn't receive any tap events. I believe I might have to reset some tappable area, but I'm not even sure where to begin with that. Does anyone have any suggestions?
I posted this same question in Xamarin's Forums, and someone there answered. For anyone looking, the answer is here: https://forums.xamarin.com/discussion/comment/142914/#Comment_142914
If that link stops working at some point in the future for some reason, the relevant answer is:
Hit testing is done based on the actual frame of the control determined by layout, but translation happens after layout. Therefore hit testing does not take translation into account. If you want a view to be touchable then you should update its layout directly rather than using translation.

dojo Show/Hide One ContentPane While Another ContentPane Is Liquid

I've been struggling for weeks trying to crack this nut so I'm not sure if it's impossible, or if it's my lack of coding chops... or both. I'm not a programmer and I'm a newbie to Dojo Toolkit.
I have a site using the BorderContainer layout. I'm trying to create an effect where I can use a button to open and close a dropdown type box that will contain controls. I need this dropdown to be hidden on page load, and then open when you click the button.
My problem is that when I open the dropdown, it pushes the content pane below it off the bottom of the browser window. I need the lower ContentPane to stay fit within the remaining space of the browser window when the dropdown opens. Additionally, I want the dropdown to sit outside of the scrollable container for the content below it, which is why I have it set up to sit outside a nested BorderContainer below it.
I've created a simplified version of the code to demonstrate my challenge (see link below). If you load the page you can see the center ContentPane scrolls the content. But, if you then click on the button, a dropdown div expands above the content. Then when you scroll, you'll notice that you can't see the full pane because it's in no-man's-land below the bottom of the browser window. I assume that because the div is set to display:none on load, it's size is not accounted for on page load. Then, when you open it by pressing the button, it's size is additive and the pane below doesn't know how to resize or account for the new element.
I've tried using the visibility attribute, but that leaves a gap for the div when it's still closed. I've tinkered with some code that controls the height that shows promise, but each of my dropdown boxes will be different sizes so I'd prefer that the height be set to "auto" rather than a specified pixel size.
Does anyone have any idea how I can accomplish this so that the lower pane will fit in the space without pushing off the screen?
Here's a sample of the page:
http://equium.com/scaffold.html
(I had some problems trying to insert the full HTML page here as a code sample so if that's a preferable way to handle it, and someone can let me know the best way to embed all of that code, I'd appreciate it.)
Thanks is advance, I'd really apprecaite anyone's feedback.
You might want to take a look at dojox.layout.ExpandoPane (though be warned I think it has only worked properly for top and left regions for a while).
Also, I'd suggest simplifying/altering your layout a bit. See example here:
http://jsfiddle.net/taFzv/
(It'd probably need some tweaking to get exactly what you want.)
The real issue you're having is probably that the BorderContainer has no idea that parts of the view resized. ExpandoPane takes care of that by telling the BorderContainer to re-layout after its animation completes.
It works under IE8.0. When dropdown box open, just keep pressing mouse from page and drag to bottom, you could see the content was pushed to out of page. It looks the browser could not detect it and could not add it to "scroll bar" account.
I would suggest taking out all BorderContainers except your top level one, the one with mainPage as the id.
Place your {stuff here} div into the mainPage BorderContainer, after the ContentPane with the Close/Open button. Make sure you make it dojotype dijit.layout.ContentPane, set up layoutpriority, and set region to top. Set the height to 0/x when clicking the Open/Close button, instead of setting display.
Try your page again. If that doesn't fix it, you probably need, a call to layout, resize, or both to indicate to the BorderContainer that it needs to evaluate all its children and size the "center" pane properly. Something like dijit.byId("mainPage").layout(); Do this any time someone presses the Close/Open button, after you have changed the height of any BorderContainer children.
Maybe the dijit.form.DropDownButton would fit your needs. When click the button a tooltip is displayed that can be filled with any content you want. Just as you specified, the dropdown tooltip is only displayed when you click the button, and it doesn't mess with the underlying layout at all. The tooltip sits "on top" of the page.

Resources