How to get a bb:cascades:Control object size?

It is sometimes necessary to retrieve the size of a control (a button, a label... etc).

I had a hard time finding a property or method that would allow me to read the current size of the control.

It is possible at all?

Thank you.

Since we need for a subset of custom controls, we decided to use the LayoutUpdateHandler after all.

If anyone needs for a similar feature - here how we did it.

Our orders have a currentBounds of QRectF private; members.

In the control's constructor, we added the following

LayoutUpdateHandler::create(this).onLayoutFrameChanged(this, SLOT(onLayoutFrameChanged(QRectF)));

Then set up a private location onLayoutFrameChanged (QRectF & limits) and updating the private member currentBounds.

It is not pretty and, more importantly, should not be really necessary in our view, but it works and we can always access the "currentBounds" property to get the actual limits.

Tags: BlackBerry Developers

Similar Questions

  • How to get the pointer to the object anchor

    Hi all


    I have a block of text and and I have an anchor object attached to it. Now I just have to select the text block and get the UID of the text block. Now I would like to get the pointer of ineterface object anchor with attached to the text Frame.How to do?

    Thank you

    Sakthivel.P

    Hi Sarah

    Add SDKLayoutHelper.cpp [from... Adobe InDesign CS SDK\source\sdksamples\common\] to your project.

    Sergiy

  • Flash publish overview - how to get the Panel info with KB size etc.?

    In CS4 overview once published the SWF in Flash, I was able to get an information board with the size in KB and more information about the published file. What can I do in CC?

    Yes, the published info size appears in Flash CC as well. You can find it at the bottom of the properties panel to the chapter in the history of SWF, once you do test movie. (Be sure that nothing is selected on the stage)

  • How to get the property of the object by it's string name

    Hi all!

    There is a function that receiver of the string value = "propertyName", which is the name of the property.

    and I have an element object with the name property is equal to "propertyName".

    How can I get to the element ofvalue of this property?

    I know that

    ObjectUtil.getClassInfo (element) .properties

    Returns an array of the properties of the element, but it's an easier way to do instead to search the table ditch?

    Thank you, Alex.

    the mounting of the parent of the object:

    var yourObject:DisplayObject = getChildByName ("propertyName");

  • LV Scripting how to get all references to schema object.

    Hello

    I'm trying to find a way to get a list of all the schema for a VI object given.  I tried the 'Plan - [AllObjects]' method, but this function returns references to key objects in the diagram, not all the objects recursively, which are inside these main objects.  Is there a method to do? If not, is there a way to do it recursively? I did not found anything so far.

    Thank you

    Michel

    Check the attached file.

    Published:

    In addition, it would be possible to make this operation recursively in the sub a high level VI VI?

    Oops I missed the recursive part, you will still be able to use the code in the attached VI, however, you must provide the references VI/Subvi of recursively.

  • How to get Windows XP Volume control program to place the icon in the systray?

    I need to recover of Windows Volume control icon in the Systray.  I went to the control panel and click on sounds and audio devices.  I click the icon for volume control of space in the task bar and get the message of Windows program Volume control is missing.

    I was wondering if there was a windows Web site where I could download the program for my XP operating system on my laptop Compaq Presasrio V2410US who is 5 years old.

    I don't remember where the original instal windows XP disc is in and need to use a Web site if available to avoid having to take it to a repair shop.  Thank you

    E-mail address is removed from the privacy *.

    I found my cd of windows and fixed it.  Thank you

  • How to get PushModel features cascading?

    Hi all

    What is the relative feature as PushModel in Java. In my application, I need that functionality for example if I click any button, if I want to show that the user function button must be the login application, then I push the login screen but here after the connection, control button.

    Please tell me any idea or any code sample.

    Thanks in advance.

    Kind regards

    Lakshman K

    It's called a NavigationPane, and it offers push and pop a bit like Java.  Have a look here:

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__navigationpane.html

  • How to get the class of an object in HTML5?

    In Actionscript, you can write:

    If (the object is myClass) {...}

    I get the easeljs

    'lib.myClass'.

    When I m logging to the console, but somehow the comparison doesn t work

    if(Object == lib.) MyClass) {//never true}

    If (Object instanceof lib. MyClass) {/ / works}

  • How to get vGroup height after adding objects?

    Hey all, I need help from you experts. After adding objects to him, I need to retrieve the height of a vGroup. Whenever I try to retrieve the value of the height property 'after' the addition of my objects, he pointed out that the height is zero?  Anyone know how to retrieve the propeller height after adding objects to a group? Your help will be greately appreciated. ..

    Mike

    You will probably need to wait for the next event to resize after the addition of the element, for example:

    http://ns.Adobe.com/MXML/2009.

    xmlns:s = "library://ns.adobe.com/flex/spark" >

    private void add (): void {}

    myGroup.addElement (new Button());

    trace (myGroup.Height);

    }

    ]]>

  • How to get around the parental control?

    XXXXXXX

    CM

    Legally we cannot help you to work around your security moms. I'm pretty sure that your teacher didn't you give a try today that holds today.  You could have asked your mother before and not been in this situation

  • How do I get the screen to normal size? How to get the start back to normal size icon?

    Vista Home premium pc / sleep monitor mode zooms in to reduce the size of the screen area work / the start icon and the menus are huge / affecting the visio program for now because I didn't need to check other files

    Hello

    Right click on desktop - customize - display settings - Set resolution.

    Right click on desktop - customize - display settings - top left adjust font size (DPI)

    Your mouse/touchpad probably incorporates a ZOOM to it.

    Hold down the CTRL key and move your central wheel of the mouse.

    I hope this helps.
    Rob - bicycle - Mark Twain said it is good.

  • Always convert Win app - cannot get rid of the controls of the projector window full-screen Mac?

    OK, two steps back. I use mx 2004 on windows to create a projector full screen for Mac. In windows, the window controls go away and the app looks like an application full screen. However, the Mac projector shows windows controls high on my 640 x 480 video - IE red, orange and green buttons at the top left.  I looked through all the parameters of publication, and I don't see anything that could be the cause.  Can someone tell me please how to get rid of these controls windows in Mac version, so I can have a clean fullscreen application to watch without control of windows?  I would be very grateful thank you!

    Prof. S.

    Do that there's no sprites on the selected scene, and then in the property inspector, and you should see a tab labeled, "View model". Click this tab and there uncheck the 'Visible' in the title bar of paragraph Options.

    I do not work on a mac, so I can't confirm that this works for mac, but if you haven't tried yet so maybe that will do the trick.

  • Gets the GUID of the object?

    Hello

    Can someone tell me please how to get the GUID of the object?

    now what I do is: -.

    objectGUID = (String) attributes.get ((String) hmConstantsMap.get ("LDAP_OBJECT_GUID")) .get (0);

    the above line gives me object GUID as follows:
    objectGUID = l & Nc?@G?m? E? H4

    Now when I'm converted this hexadecimal value what I mean and what is actually different.

    SIZE = 6 26 4F 63 B7 13 40 47 9 6 D 9 D 45 CD

    What I want to say = 6 c 26 4F 63 13 40 47 6 d 45 48 34 3f 3f 3f 3f 3f

    GUID of the object is always in an encrypted format. You need decrypt the key to convert it to simple format. But I think that you can't. It is not easy.

  • get the ddl of the object in sqlplus

    Hello.

    How to get into the sqlplus to object ddl statement?

    as:

    Select the ddl from dba_objects where object_name = 'my_table ';

    Hello

    You can use the package which is displayed in the posts above else there are alternatives to get the DDL both
    For more than one table. You can go for export and import with Options by which you can get the DDL for all
    the objects in the schema according to your requirement.

    You can go for "dbms_metadata.get_ddl".
    next thing export and import with show options = 'Y '.

    -Pavan Kumar N

  • How to return the QML C++ bb::cascades:Control as a property object?

    Hi all

    I need to return the value of the property QML in C++ code, problem is that this value is object of bb::cascades:Control

    Look at the example:

    import bb.cascades 1.2
    
    Page {
     property NavigationPane currentNavigationPane: tab1.navHandle
     property int testprop:0
    }
    

    In C++, I need to retrieve the value of currentNavigationPane property (I suppose it must point to NavigationPane *)

           QVariant const   prop=__current_page->property("currentNavigationPane");
            NavigationPane* nav_p=prop.value();
            if (nav_p!=NULL){
                qDebug()<<"nav_p is not NULL";
            }
            qDebug()<
    

    As a result of this code: nav_p is the null pointer and app crashes without any note of debugging on qDebug()<>

    I found the solution by Exhibitor class c ++ in QML and I can call its methods with pointer to bb::cascades:Control as a parameter

    QML

    Page {
    id:this_page
        onCreationCompleted: {
            mainCPP.UpdatePage(this_page);
        }
    }
    

    C++

    Q_INVOKABLE void UpdatePage(bb::cascades::Page *call_back_page){
    if(call_back_page){
    qDebug()<<"Page is valid";
    }
    }
    

    By this method, I can use control of Cascade in C++

     

Maybe you are looking for

  • How to change the default zoom to 150% level?

    I'm not a geek and I think I want something simple: when I run Mozilla Firefox I want to automatically set at 150% zoom. In other words, I want to remind that my preference is 150% zoom level so I don't if it fix whenever I have run Mozilla Firefox o

  • Slide on the stuck app

    9.3.3 Pro iPad using software with the slide more I receive the same app when I slip on it, it's the same application.  I can't change it, even when I close the application GH

  • USB2.0 for Satellite Pro 6000

    Is it possible to install the controller USB 2.0 on my laptop? If Yes, where can I get a?see you soonYaro

  • 2D-cell formatting

    I have 2d-table in the report.  a column is pass/fail status.  I want to 'PASS' Green, 'FAIL' text color in red.  I don't think it's possible. any comments? Jim

  • Detection of peaks of waveform data

    Hi people. It is probably obvious, but I can't understand it. In the attached VI sine wave detector summits are determined from a simulated signal. I want to be able to do the same thing with a waveform data (DBL), but it won't let me. How can I extr