Toolbar view in application currently
I need to make the image in the toolbar bigger so that one can see the text.
Code so far:
[Code](https://i.stack.imgur.com/tZASn.png)
So, how would I go about resizing the image so that the text in it is clearly visible. Right now the image is too small in the toolbar. Thank you
fillMode is your issue here, if you comment that out it will not resize to fit in the (small) height of the toolbar
Related
I have a very tall image (400px x 50000px, 1.6Mo) that I would like to display inside a scrollView.
When I import it to the images.xcassets, the img preview is blank. The image also doesn't show up in the scrollview (although the scroll bar seems to be ok in term of height).
Any idea what could be the problem? (using a smaller image works fine hence no issue with the code)
Are there any IOS limitations?
Thanks in advance for the help!
I think this is an obvious bug on Xcode 6.0.1 but I'm searching for at least a workaround. In interface builder, I have an image view that is smaller in dimensions than the image that it contains. Here is my newly created, fresh nib with just an image view, the heart image is a larger PNG file than the containing image view:
So far so good. However, when I click on the any of the grips at the corners/edges of the view to resize the image view, it immediately changes to this the very moment I click on the grip:
This happens whenever I try to resize by hand (I can resize using width/height values at inspector though) and I have hard time trying to fit my design into the nib. The problem happens both on nibs and the storyboards. Does anyone know a workaround?
UPDATE: I've updated to Xcode 6.1 but I'm still having the same problem.
The same result I've noticed when close and reopen the project. The view continues to grow up every time. I have created a simple project to search the cause of the wrong behavior of the autoresizing mask (flexible width AND align to right).
So, try to disable "flexible width/height" and "align to right". Keep the "align to left" only.
This answer is for autolayout-enabled views/nibs. For autoresizing mask solution, see Nicolai Nita's answer: Xcode 6.0/6.1 Interface Builder resizes views to fit whole content when clicked on the corner grip to resize
I've solved the problem by setting the content compression resistance priority (both vertical and horizontal) to 250 from 750. I don't know why it wasn't the case before Xcode 5 though.
I am currently using the Image control in XAML, when the user taps on the image I want to display another image like a tap effect*, so for example I want to make the image a bit darker or lighter once the user taps on it, how can I do this using the image control?
I've managed to fix this with adding a new image to the mousebuttonup, mousebuttondown and mouseleave event of the image control
You could place a collapsed image with the same size at the same position as the first one. If the user taps the image, you show the previously collapsed image.
If you want to make your first image darker, set the background of your hidden image to black and opacity to 0.25 or something like this. When it gets visible your first image will be slightly darker.
Instead that you can try to customize the style of your button. In Visual State>>Pressed>>You can change the Color or you can give some animation as well.
tHANKS,
I recently took to Qt Programming and want to port my app to Qt.
I'm fiddling with QPushButtons and I've managed to display an image into the button and to set some text to the button but, whatever I do, with or without the designer,
I have the same problem, the text is aligned right to the icon instead of being overlaid over the icon.
addButton = new QPushButton();
addButton->setIcon(QIcon(":/AddButton.png"));
addButton->setText(tr("+"));
addButton->setFlat(true);
addButton->setIconSize(QSize(100,90));
What am I missing ?
I know there is the toolButton but it doesn't seem to have the "flat" property.
Any idea please ?
Thanks a lot,
Mike
If you are trying to use your image as a background image, you can use a style sheet:
addButton->setStyleSheet("background-image: url(:/AddButton.png);"
"background-repeat: no-repeat;"
"background-position: center center");
You'll just have to make sure the size of your button is at least as big as the image.
I am new to BlackBerry Java application development. My scenario is: In my application a gallery list of images will be displayed in a small icons. If I click on any image it will display in a large mode. Here I need to provide controls like front and back buttons. On clicking on those buttons the background image should change. In addition to that those buttons should be highlighted and the back ground large image should be transparent. How to do this?
Please guide me.
You can use Graphics.setGlobalAlpha() on paint() or to modify bitmap before preview.
Don't forget to set back normal global alpha value after bitmap drawing.