problems of centering (vertically) a button on the screen

Hello.

I have a blackberry 10 cascades app with the code below.

How could I get the button to fill the entire screen? I would have thought the following would do the trick, but it doesn't. The button expands horizontally to fill the width of the parent, but vertically the buttn just at the top of the screen the same as if I had not called setVerticalAlignment() at all.

Any ideas? Maybe it's a bug?

Thank you very much in advance.

//-----------------------------------------

Page * Pg = new Page();

Button * butt = new Button();
Welding end to end-> setText ("well");
Welding end-to-end-> setHorizontalAlignment (HorizontalAlignment::Fill);
Welding end-to-end-> setVerticalAlignment (VerticalAlignment::Fill);

PG-> setContent (Butt);

Application::instance()-> setScene (Pg);

I really expect that this works only inside a container with a DockLayout. I don't know what pages in terms of layout, but I'm going to guess that they do nothing, which would mean that their single 'content' component would not adjusted at all position and sat at 0,0 or the upper left corner.

It looks like you to experiment a little... in practice, I don't think that someone never put a single item non-conteneur on a Page, but generally always a container of other stuff in it. The default value for a container is StackLayout, so you will need to change to DockLayout and default alignment for stuff is Left and Top, so it should work with your Center for vertical alignment.

Tags: BlackBerry Developers

Similar Questions

  • Satellite P30 - three vertical lines appeared on the screen

    I have a problem with the display on my p30 110 three vertical lines appeared on the screen, the pc has been scanned with three different antivirus programs and seems to be clean any suggestions would be helpful

    Hello

    These problems usually occur due to a malfunction of the equipment.
    But have you tried to update the graphics driver. If this isn't the case, so I recommend to do.
    The update may solve some problems.

    However, if vertical lines persists then you should ask Toshiba service for assistance.
    He must check the laptop.

  • Size of the screen and now it's too big, I don't see that the button on the screen of the low b/cause is too big... Please help!

    I adjusted the size of my screen and now it's too big, I can't change back b/cause when I go there I can't access the button change downstairs. I was about to return to a bygone era, but again I don't see not the button on the screen of the low b/cause is too big... Please help!

    Hello

    Press the ENTER key on your keyboard instead of clicking OK to change the resolution of the screen as a solution to your problem.

    See you soon.

  • Help! When HP system windows7, including the QuickWeb button on the screen of the go blue screen with the option - BIOS application error (501).

    Help! When HP system windows7, including the QuickWeb button on the screen of the go blue screen with the option - BIOS application error (501).

    Help! When HP system windows7, including the QuickWeb button on the screen of the go blue screen with the option - BIOS application error (501).

    The error you mentioned does not match the description of the usual Windows blue screen errors. When I put this error for a web-search, it has proved to be a common problem with some HP computers. I was able to get my hands on the following link for a thread in HP communities that contains information about this error. Have a read of the content in this link and see if this applies to your situation:

    http://h30499.www3.HP.com/T5/notebook-HP-ProBook-EliteBook/HP-6730b-quot-BIOS-application-error-501-quot/TD-p/1075640

    Windows errors blue screen looks something like this. If you receive these errors, let us know about it as well as the complete info you see on the screen. And the error you mentioned in your initial post, I guess that the HP support forums would be a better place to discuss. Here is the link to the HP support forums:

    http://h30434.www3.HP.com/

  • X230T - buttons under the screen don't work - help?

    I love my ThinkPad, but the buttons under the screen don't work to rotate the screen etc. I can't find a solution. Help?

    Welcome to the community.

    the first thing is to check that you have the drivers latest tablet installed button.

    If you look at the matrix driver here: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&DocID=HT073838

    Look in the selection 'mouse and keyboard' and select the version to match your operating system and open the readme file. It will tell you how to determine your version and the latest version fixes and how to install it. Note that the matrix is generally more current than tvsu.

    Please post when you had the chance to watch and we will try to help others.

    Cheers.

  • Cancel disable them button on the screen at the time of order credit check Hold applied

    Hello

    I want to cancel button on the screen at the time of order credit check Hold applied

    Thank you

    Please see the note below

    Book order cancel (https://mosemp.us.oracle.com/epmos/faces/ui/km/DocumentDisplay.jspx?id=412683.1Doc ID 412683.1) button-click button grayed out in process Message window after

    This applies to your case

  • Problem HP Pavilion 15 left button of the mouse

    Something seems to have gone wrong or goes wrong with my HP Pavilion 15 laptop.

    The left mouse button doesn't seem to be completely back to its normal position on the right side of the button. It seems to be about 1 mm below where it should return to.

    The button is still fully functional, the left side of the button gets to his normal position of return but the right side is certainly a little weak - there is a separate step to the right button of the mouse that touches.

    The laptop is less than a year and I am consideringing it let's get back to the where I bought it, even if the button still works.

    Everyone had a problem like this with the muse... buttons?

    Thank you

    Hello Nigel_S

    Welcome to the HP Forums!

    I understand that you are concerned about the button to left click on the touchpad of your laptop.

    There is a little spring under the buttons making the jump to the top, but over time, it can slide or wear out. This usually only happens on notebooks and is not exclusively limited to HP. In view of your product is still under warranty and it is definitely a hardware problem, I would suggest contacting a helpline for service options. You can contact HP Technical Support at 1-800-474-6836 in North America. For all other regions click here.

    Hope this helps!

  • Tecra M4 - lines of vertical black pixel on the screen

    Hello

    This morning I turned on my laptop and suddenly I have vertical black pixellines more my whole screen.
    There's a line that works normally, who is black, a job, a black man,... and this all over the screen.
    In this same way read something is very difficult.

    I have no idea what can be wrong, I did not install something recently or anything like that. I tried the system recovery, but the problem will not be solved.

    No idea what this can be?
    I appreciate your help!

    Sincerely,
    Seppe

    > I tried system recovery, but the problem will not be solved.
    It looks like a hardware problem, but try the BIOS default. In order to access the BIOS press ESC and F1 at the beginning.

    On the other hand I recommend you connect the external monitor to the laptop to determine what might be wrong.
    If the same lines would appear on external monitor, then a graphics card failure can cause this problem ;(

  • Equium L20-197: vertical strip appeared on the screen!

    My L20-197 18 months, began to display a vertical bar orange 38mm wide pale from the top to the bottom of the screen of 40mm from the left side.

    If I pinch the screen surround above the place where the Bar starts, he disappears and then returns when I let go. What is the cause, is there a simple solution or do I pinch my toshiba whenever I need a clear on-screen display?

    Any suggestion would be appreciated.

    Chrisjim.

    Hello

    No there is no 'miracle' and no Don t you can't pinch your screen. Just send your machine to an authorized repair partner, hardwarecheckup, and probably because it sounds like a serious hardware problem and you shouldn't wait.

    Just follow this link to find the nearest authorized service partner (ASP) and call:

    http://EU.computers.Toshiba-Europe.com/cgi-bin/ToshibaCSG/generic_content.jsp?service=EU&ID=ASP_SUPPORT

    Welcome them

  • iXpand App update 1.4.2 - Select + button freezes the screen and blocking app

    After removing the SanDisk iXpand version 1.4.1 of my Air iPad app and my iPad Pro and then restart the devices - and then download and install the latest app iXpand 1.4.2 (available today 3/4) I still have problems with the app crashing.

    I have more 30 000 photos - too many auto save.  But I don't want to choose the pictures and albums from the Photos app on my IOS devices.  Whenever I have ' touch/tap' red + button at the bottom of the app from SanDisk to try to select photos or videos the IOS device screen freezes and then in 5-10 seconds after application crashes and takes back me to the home screen.

    The button + red works for any of you using IOS 9.2.1 on iPhone or iPad?  Present your reported this as a problem of technique SanDisk support and received a solution.

    It seems to me be a permissions problem.  I think that the app would need permission to access pictures on the film and in the Photos app.

    Any suggestions or ideas would be appreciated.  Thanks in advance! -Tom

    Now it works!  Simply update your devices to SanDisk iXpand App updated to version 1.6.1 (last version dated 14/03/2016) and now the Select + button works.  After updating the app, you can go to-> the settings-> iXpanD Sync and make sure Contacts and Photos (allow access to...) and power (green).

    Now I can choose any photo from my collection of more 30 000 and copy the original to any folder on the iXpand drive I want. Perfect!  No more crashing!

    BTW: You may need to wait a few seconds (depending on the size of your photo library) to the first screen of your photos to come.  With my 30,000 I wait about 30 seconds.  You can view the entire library, or you can view individual files from your library of photos IOS.  Very well.

    Thank you SanDisk coders to get this issue fixed!

  • How to move from the position of the START button on the screen of my Windows vista?

    I wonder why the START button of my windows vista changes its position on the screen of my laptop. I tried to search the solution by right-clicking the windows logo ang then go to properties and proceed to the taskbar button. From there I could not fined option on how to change the position of my taskbar, usually on the lower part of the horizontal of the monitor. Now, he has moved from the left upright. I need to restore the parameters passed. Please help me.

    Hello

    read this:

    http://Windows.Microsoft.com/en-us/Windows-Vista/unlock-and-move-the-taskbar

    Unlock and move the taskbar

    Once you unlock the taskbar, it is ready to move to any horizontal or vertical office edge.

    Taskbar

    View all

    To unlock the taskbar
    • Right click on a space empty in the taskbar. If a checkmark beside him doesn't lock the taskbar, the taskbar is locked. You can unlock it by clicking on lock the taskbar, which removes the check mark.

      Note

      To lock the taskbar into place, right-click an empty space in the task bar, then click on lock the taskbar, so that the box is displayed.

    • Click on an empty space on the taskbar, and then hold down the mouse button, dragging the taskbar to one of the four sides of the office. Once the taskbar where you want, release the mouse button.

  • White vertical line appeared on the screen.

    A vertical white line appeared about 3 inches from the left hand side on my Dell Studio 1749.  It started about 1 mm wide, but increases in width and is now about 4 mm wide.  There is no problem on an external monitor when connected.

    Is this likely to be a problem with the Panel or a chip problem?

    Thank you.

    Yes, probably would have worked, but I just replaced the screen in the end.

    Thank you

    Ian

  • Dell Inspiron 15: Vertical black line on the screen.

    Dell Inspiron 15 , I bought about 8 months ago. The specs are as under: -.
    Intel Core i3 3217U clocked at 1.8 Ghz
    4 GB RAM DDR3
    1 GB Intel HD 4000
    1 GB AMD 7670 M (switchable)
    500 GB HARD DRIVE AT 5400 RPM
    Windows 8 Core 64-bit Edition

    The laptop was working absolutely fine with no problems until yesterday. Today morning when I turned on the laptop, I noticed a vertical black line on the desktop with an endpoint at the end of the line on my screen. At first I thought it would be a graphic bug which would disappear on reboot, done repeatedly, but no avail. The black line is more noticeable on a light background.

    Laptop has not been submitted to harsh handling or stress. What could be the cause of it? Is it a manufacturing fault or something else?

    I am attaching 2 photos of the screen from different angles to obtain a correct and complete line. Please tell me how should I proceed from here.

    Contact Dell for a replacement of the LCD warranty.

  • Blue vertical line appear on the screen of the series M Satellite

    I had a blue vertical line appear on my screen its about inch thick and is at - it start, can someone tell me if I can get rid of him? Thank you.

    Hello

    If this blue line is present from the first second after turning on the laptop that I presume it's because of the faulty graphics card. To be sure try to connect an external display to see the same thing will happen. If Yes, it is the evidence that this line occurs due to faulty hardware.

  • Vertical lines flickering and the screen is not responding on my IPhone 6 more.

    My iPhone 6 Plus continues to have strange flickering gray/white vertical lines which slide down from the top of the screen on a regular basis, it does stop when I hit him in the back really hard and sometimes my iPhone screen does not, I would not be able to click on all of the apps I want and sometimes the phone would open up another application.

    Another thing is that when I pressed on the top of the screen of my iPhone, I see these white lines that are similar to there is water in which I think he does. My AppleCare expired recently and I'm afraid to go to a phone shop for repair because I don't have any knowledge about how much it will cost.

    Please help me.

    Visit an Apple Retail Store or Apple authorized service provider to check the phone. If you're lucky, the screen must be replaced if there is more internal damage, the device might have to replace:

    Pricing of the service repair screen

    Repair and replacement costs depend on your iPhone and your AppleCare products cover model. Apple runs a diagnostic test to determine if your iPhone has suffered additional damage. If she has, or if she needs more repairs, you may have to pay out-of-warranty service. Accidental damage is not covered by the Apple one-year limited warranty.

    Model Screen repair cost
    iPhone 6 $109
    iPhone iPhone 6s 6 Plus, iPhone 5 s, iPhone 5, iPhone 5 $129
    iPhone 6 sec more $149

    In addition, a $6.95 shipping charges if necessary. Fees are in US Dollars and exclude tax. The price is for the service through Apple. The final service charge we charge will be determined during testing. Pricing and terms vary for the service by an Apple authorized service provider.

    Out of warranty repair service

    If your repair is not covered by Apple limited one-year AppleCare warranty + or AppleCare Protection Plan, your iPhone may be eligible for out-of-warranty service. For example, the liquid damage is not covered by the warranty, but may be eligible for out-of-warranty service. Some damage is not eligible, for example, if your device has been broken into several pieces. See the terms of repair of Apple and Conditions for more details.
    Read the terms of Apple repair

    Model Out-of-warranty service fee Battery service *
    iPhone 6 s more, iPhone 6 Plus $329

    $79
    * available only if battery
    Apple diagnostic test failure

    iPhone iPhone 6s 6 $299
    iPhone 5, iPhone 5, iPhone 5 $269
    iPhone 4S $199
    iPhone 4, iPhone 3GS, iPhone 3G $149

    In addition, a $6.95 shipping charges if necessary. Fees are in US Dollars and exclude tax. The price is for the service through Apple. The final service charge we charge will be determined during the tests and may be less than the costs of service above. Pricing and terms vary for the service by an Apple authorized service provider.

    Off-warranty price varies for Apple accessories such as adapters and cases for Apple iPhone. For more information, contact your operator, Apple or an Apple authorized service provider.

    copied from answer Service Center - iPhone

Maybe you are looking for