Button not showing in .nib file - macos

So I downloaded CircleView and tried to change the code. The program came with a button, color wheel, 2 sliders, and a view. When ever I add anything (Slider, button, textfield), on run time the things I added wouldn't show up. What am I not doing?
It's a .nib file.
This is the edit page.
This is what I see when running the program.
As you can see, the button and textfield doesn't appear during run time.

By default, when you add a button, the autoresizing mask (aka "springs and struts") are set to the following:
That means that when you resize the window, the button you added will stay in the same spot it originally was, instead of being "pulled" down with the edge of the window. This could potentially cause the buttons or textfields you added to be hidden behind the circle view once you resize the window large enough.
To prevent that from happening you'll want to change the autoresizing mask of the items to be "pinned" to the bottom edge of the window, so that they look like in the following image:
To do that, click on the red I bar at the top of the square to remove it, and then click on the lower I area to turn it on.
Note that you can also select multiple buttons or textfields at one time to change them all at the same time.

Related

Firemonkey TComboColorBox hiding color picker

Is there a way, after selection of a color, to programmatically hide the color picker of the TComboColorBox? I've searched on the web and Embarcadero community but couldn't find a way to do this.
The answer is no, there is no designed way to hide (collapse) the popup programmatically. And you did not explain why you think it would be necessary to have.
Keep in mind that there are 4 subcontrols, that the user may want to use:
a THueTrackBar,
an alpha channel trackbar,
a color quad, and
a hex color value edit box.
An automatic collapse of the popup would be just annoying.
The user can at any time decide to close the popup simply by clicking on the constantly visible bar.
With reference to your comment:
After your answer, I realized that I must implement a color picker component that shows a rect containing a TComboColorBox and a TButton as childs. Clicking the child button, in turn, hides the container rect itself.
I have told you twice that the user can close the popup part of the TComboColorBox simply by clicking on the component (the base part of it).
In fact, the user can click anywhere outside of the popup window in order to close the popup window. The popup is closed immediately when the focus moves away from it.
In my opinion there's no need for a special "Close" button.

Highslide: Shrink image back when clicking in outer area

The only thing which I disklike whith highslide is the fact that when I click a thumbnail and it gets bigger I only can shrink it back when I click exactly in the image area.
Is it possible to shrink the image back when clicking outside the image area?
(and optional also shrink it back when I hover outside the image with the mouse cursor?)
Thanks
If you use a dimming background (hs.dimmingOpacity=0.7, for example), clicking outside the image area will close the expander. This requires highslide-full.js. If you don't want a dimming background, just set the opacity to a tiny value, like hs.dimmingOpacity=0.01.
It might be possible to include an onAfterExpand event to close the expander when you hover outside the image, but I think I can guarantee that you wouldn't like it. If a visitor clicked on a thumbnail, but didn't just happen to have his mouse over the image when it opened, it would immediately close again. That would be very frustrating behavior for the site visitor.

Drawing on an image which is inside a QScrollArea?

If I subclass QLabel and I add a QLabel directly to my QDialog, it works fine. If I add this label inside a ScrollArea, the thing I’m drawing doesn’t show unless I resize the dialog itself. Yes, weird.
I’ve setup compilable example code that indicates what the problem is. What I am trying to do is to select an area of an image with my mouse, by drawing a rectangle on the corresponding area. The images my program is designed to work with can be very large, and thus, I need to have a scroll area so as the dialog to stay at a logical dimension, and not to fill the entire screen (or even multiple workspaces, if we are talking about a linux machine with multiple desktops).
Everything works fine, except that the drawing (selection-rectangle) isn’t visible unless the dialog is resized – manually. I think I have to update something while drawing, but I’m not sure what. Well, here’s the example code: http://paste.ubuntu.com/1151553/
Another issues that I don’t know how to solve (and I want your suggestions there) are (1) when the user is selecting an area, how to set it to automatically scroll when the user actually selects an area by pushing against to a wall of the scroll area (I guess I am understandable here). (2) is there a way to let the user select a rectangle and then, when he left-clicks on a position with holding down the [Shift] button, the bottom right edge of his previous selection to actually go through the point he clicks at?
The documentation indicates that you have to set a Layout somehow somewhere, but I'm not sure how to do this to my occassion.
Thanks in advance for any help.
about problem (1):
just use of Event. i think mouse Enter Event or Leave Event is good for that.
and to do that i think you can use a hidden rectangular that fill the whole of the screen.
and over write the mouse leave Event for that rectangular and tell in that function , to scroll the page.

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.

How do I resize a window (animating)? Hiding and unhiding menus

Yeah, I did my homework and I found the setFrame:frame display:YES animate:YES but I don't understand how am I find out the height necessary to make it bigger or smaller. Let me exemplify: I'm making kind of spotlight search tool but when the user start the app it will just have a textfield (to type in the search keywords) and a button (Filter Settings) and the window fits the size of these two objects (NOTE: The window start position is on the center and on the top of the screen). When the user hits the "Filter Settings" button I want the window to make an animation going down and then showing the "check box group" that filters the search results.
In your case you need to find out the height of the check box group that you are adding to the view. An easy way to do this is to make a seperate view in your nib that contains the check boxes. Hook up the view to the window using IB, and when it is time to display the check boxes add that view to the windows content view and animate the window resize.

Resources