Waterfalls: textStyle.color ignored for TextArea created running

I'm trying to set the color of the text in a text box created running. My main.xml inserts MyWidget static control like this:

import bb.cascades 1.0

Page {
    content: Container {
        objectName: "topLevel"
        MyWidget {}
    }
}

MyWidget.qml looks like this:

Container {
    TextArea {
        editable: false
        text: "some text"
        textStyle.color: Color.create ("#ffff0000")
    }
}

And I dynamically add a MyWidget running like this:

QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, QUrl::fromLocalFile("app/native/assets/MyWidget.qml"));
QObject *object = component.create();
Container *topLevel = root->findChild("topLevel");
topLevel->add(qobject_cast(object));

So I have two MyWidget elements in the app - we have created in the QML file and added dynamically. The object created in QML has the color of the text properly the value red, but that created dynamically fails to set the color of text and uses the default value (black). You can see what looks like a screengrab from the http://imgur.com/PrSk7 Simulator

I get an error at run time in the console that says:

file:///accounts/1000/appdata/[...]/app/native/assets/MyWidget.qml:21: ReferenceError: Can't find variable: Color

I tried several other things like affecting the color colours incorporated ("Color.Red") and the color of the text running, what kind of work.

If I put the color of the text incorrectly, or is this a bug in the program?

I've been playing with creating text boxes in different ways.

I'll try your tomorrow, but I suspect that the problem is that QDeclarativeEngine is in space Qt.

In my example, I added to the text box to a c1 container:

QmlDocument * tbQml = QmlDocument::create ("Mytextbox.qml");  Note: namespace bb::cascades
Container container = tbQml-> createRootNode();
If (container)
{
C1-> add (container);
}

The color appears as expected.

Tags: BlackBerry Developers

Similar Questions

  • Ignored TextStyle.color then changed from C++

    TextStyle.color of QML setting works very well. Although, when I try to create controls in C++ and dynamically add them to a container created in QML, the textStyle.color gets ignored every time.

    Label* lbl= new Label();
    QString text("SomeText");
    
    lbl->textStyle()->setColor(QColor("#000000"));
    
    //QColor color = QColor::fromRgb(255, 0, 0);
    //QVariant variant = color;
    //lbl->textStyle()->setColor(variant);
    
    lbl->setText(text);
    
    container->add(lbl);
    

    container is an instantiated from QML bb::cascades:Container.

    Hello

    I have not tried to call setColor directly, but the following works:

    bb::cascades::TextStyle bodyTextStyle(SystemDefaults::TextStyles::bodyText());
    bodyTextStyle.setColor(Color::fromARGB(0xff5a595a));
    
    label->setTextStyle(bodyTextStyle);
    

    Could you try if Color::fromARGB (0xaarrggbb) Variant work?

  • what need parameter should be ignored for creating table in LMT

    Hi all

    I have locally managed tablespace (LMT) with the type of ventilation SYSTEM and segment_space_management is AUTOMATIC. My database is Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi.

    I have for example:

    create table (ID)
    PCTFREE 5
    INITTRANS 2
    STORAGE (Initial...).


    Oracle documnetation, I found that it is recommended to omit the storage clause when you use LMT.

    I want to know, I do also omit PCTFREE 5, INITTRANS 2 of the create table statement?

    Thanks for any advice.

    Dear spur230,

    Yes, you can omit these parameters either.

    Here's the answer to your question;

    http://download.Oracle.com/docs/CD/B19306_01/server.102/b14231/tspaces.htm#sthref1153

    +"+
    * + Creating a locally managed Tablespace + *.

    + Create a locally managed tablespace by specifying IN clause of the CREATE TABLESPACE statement SCOPE MANAGEMENT. This is the default value for new permanent storage space, but you must specify the EXTENT MANAGEMENT LOCAL clause if you want to specify the AUTOALLOCATE or the UNIFORM clause. You can have the database to manage extensions for you automatically with the clause AUTOALLOCATE (default), or you can specify that the tablespace is managed with uniform extents of a specific size (UNIFORM). +

    + If you plan the tablespace contains objects of various sizes, requiring many scopes with different sizes, then AUTOALLOCATE is the best choice. AUTOALLOCATE is also a good choice if it is not important for you to have a lot of control over the allocation of space and the deallocation, because it simplifies the management of the table space. A space may be wasted with this parameter, but the advantage of having the Oracle database manage your space probably outweigh this disadvantage. +

    + If you want exact control on unused space, and you can predict exactly the space to allocate for an object or objects and the number and size of extensions, and then UNIFORM is a good choice. This setting ensures that you will never have the unusable space in your tablespace. +

    * + When you do not explicitly specify the type of management, database Oracle determines management extended as follows: + *.

    + * _If the CREATE TABLESPACE statement omits the DEFAULT storage clause, then the database creates a locally managed tablespace autoallocated. _ +
    + * _If the CREATE TABLESPACE statement includes a default storage clause, then the database considers the following: _ +.
    + O _If you specified AS MINIMUM clause, the database evaluates if MEASURE MINIMUM values, INITIAL, FOLLOWING are equal, and the value for PCTINCREASE is 0. If so, the database creates a locally managed tablespace uniform with size = INITIAL measurement. If the parameters to MEASURE MINIMUM INITIAL and NEXT are not equal, otherwise PCTINCREASE is not 0, the database ignores storage extent parameters you specify and creates a locally managed tablespace autoallocated. _ +
    + o _If you have not specified a MEASURE MINIMUM clause, the database evaluates only if the values of storage are the same INITIAL and NEXT and PCTINCREASE is 0. If so, the tablespace is locally managed and uniform. Otherwise, the tablespace is locally managed and autoallocated. _ +

    + The following statement creates a managed tablespace locally named lmtbsb and specifies AUTOALLOCATE: +.

    + CREATE TABLESPACE lmtbsb DATAFILE ' / u02/oracle/data/lmtbsb01.dbf' SIZE 50 +.
    + EXTENT MANAGEMENT LOCAL AUTOALLOCATE; +

    + AUTOALLOCATE causes tablespace system managed with a volume of minimum extent of 64K. +

    + The alternative to AUTOALLOCATE is UNIFORM. who says that the tablespace is managed with uniform size extents. You can specify the size of the uniform SIZE clause. If you omit the SIZE, the default size is 1 M. +

    + The following example creates a tablespace with uniform extents of 128 K. (In a database with 2 K blocks, each would amount to 64 blocks of data). Each measure 128K is represented by a bit in the bitmap extent for this file. +

    + CREATE TABLESPACE lmtbsb DATAFILE ' / u02/oracle/data/lmtbsb01.dbf' SIZE 50 +.
    + EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K; +

    + You can not specify the storage, TEMPORARY or MEASURE MINIMUM clause by DEFAULT when you explicitly specify EXTENT MANAGEMENT LOCAL. If you want to create a locally managed temporary tablespace, use the statement to CREATE a TEMPORARY TABLESPACE. +
    +"+

    Hope that helps.

    Ogan

  • Problem creating test instance, cannot run processSetup for configuration: cannot run createHOMObj for configuration: No. GuestOS appearing in the XML file

    I got following error when running tests on the Workbench 2.1


    [February 19, 2014 16:27:10: TRANSPORT] [0] FRAME: Async command is monitored by the process of STAF 73

    [February 19, 2014 16:27:10: FACTORYIMP] SETTING [0]: insert in the container

    [February 19, 2014 16:27:10: TESTHASH] [0] INFO: VirtualMachine installation process

    [February 19, 2014 16:27:10: VIRTUALMAC] [0] FRAMEWORK: the Setup() method called

    [February 19, 2014 16:27:10: STAFBASE] SETTING [0]: command execution STAF: staf VTAF_VM localhost connect password of administrator agent 192.168.8.158 userid: 11:Infocore' 1 q ssl

    [February 19, 2014 16:27:10: STAFBASE] [0] FRAME: command execution STAF: staf localhost VTAF_VM getvms anchor 192.168.8.158:administrator

    [February 19, 2014 16:27:11: MULTITECH] [0] FRAME: called VTAF::TestLib:Sphere:Lib:STAFSDK:HostSystem:GetAllVMs (HostName = '192.168.8.150' password = 'infocore"username ="root") returned UNDEF

    [February 19, 2014 16:27:11: VIRTUALMAC] [0] FRAMEWORK: new creation vaaivm1-150 VM from scratch...

    [February 19, 2014 16:27:11: TESTHASH] [0] ERROR: cannot run processSetup for configuration: cannot run createHOMObj for configuration: No. GuestOS appearing in the XML file

    [February 19, 2014 16:27:11: TESTHASH] WARN [0]: found objects that need to be cleaned

    [February 19, 2014 16:27:11: VIRTUALMAC] [0] INFO: cleaning of the virtual machine: vaaivm1-150

    [February 19, 2014 16:27:11: HOSTSYSTEM] [0] FRAME: HostSystem Cleanup() called

    [February 19, 2014 16:27:11: HOSTSYSTEM] [0] FRAMEWORK: the location of the swapfile to the directory of the VM on the host 192.168.8.150 restoration VM...

    [February 19, 2014 16:27:11: HOSTSYSTEM] SETTING [0]: setting VM Swapfile location to use the directory of the virtual machine

    [February 19, 2014 16:27:11: STAFBASE] SETTING [0]: command execution STAF: staf VTAF_Host localhost connect password of administrator agent 192.168.8.158 userid: 11:Infocore' 1 q ssl

    [February 19, 2014 16:27:11: STAFBASE] [0] FRAME: command execution STAF: staf localhost VTAF_Host setswapfilelocation anchor 192.168.8.158:administrator host 192.168.8.150

    [February 19, 2014 16:27:31: MULTITECH] [0] FRAME: called VTAF::TestLib:Sphere:Lib:STAFSDK:HostSystem:SetSwapFileLocation (HostName = '192.168.8.150' password = 'infocore"username ="root") '1' returned

    [February 19, 2014 16:27:31: HOSTSYSTEM] [0] FRAME: destruction of object 192.168.8.150...

    [February 19, 2014 16:27:31: LOGMANAGEM] COMMENTS [0]: recovery log file 192.168.8.150 host vmkernel.log

    [February 19, 2014 16:27:31: FILEUTILIT] [0] FRAME: PutTmpDirectory - called for destination host localhost

    The same problem was sloved.

    Re: Hardware Certification-do can not find the storage50info.txt file to...

  • Permission to create/run the scheduled task

    Hello

    I'm running Windows 7 Pro RTM and I try to use my normal user account to create and run a new scheduled task, but whenever I try to save the task, I get an error msg saying "Task Scheduler cannot create the task.» Does not know the user account, the password is incorrect or the user account doesn't have permission to create this task".

    I have no problems running tasks under my admin account, but I don't want to use it for everyday purposes. I'm also sure that this error must be because of permissions problems, so can I know what is the privilege that a user must have to create/run one account task?

    Thank you very much

    Hi hifer,.

    Please use the forum for answers,

    If your account is a standard account, you will not have permission to create a task or schedule task.  Your account must be an administrator account to schedule the task for the system or it must be run as an administrator.

    It have additional permissions, you can add standard user profile to allow the profile to create the task.  But this option is not available in all versions of Windows and rather complicated.  You can try to add these groups to your profile using computer management in administrative tools.  User with power and Backup administrator can provide you with the authorization that you need if the groups are available with your version of Windows 7.

    Hope this helps,

    Kevin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • It must for application Apex runs in mode listener Apex to use Apex listener 2.0 as a print server?

    Hello world

    I'm an Oracle Apex developer for 2 years now.

    Recently, I was in charge of search and do a few examples of how to print pdf with Oracle Apex 4.2.2 (Oracle 11 g).

    I want to use Apex 2.0 listener that standalone as a print server, we installed and we changed the configuration of the print server in the administration workspace. Then I created a report query and when I have the test report, a pdf file is downloaded, but when he opens, Adobe reader tells me that is not a valid pdf file.

    Our Apex application runs in the pl/sql gateway mode not Apex listener.

    So my squestion is: "" Is it mandatory for application Apex runs in mode listener Apex to use Apex listener 2.0 as a print server?".

    Thanks for help.

    Best regards

    You

    Khadija Khalfallah wrote:

    Thanks for your reply.

    We have an apex application that already runs using EPG and we want to allow printing of the pdf in it. So, we installed the ADR offline, to use as a print server but it does not seem possible if the Apex app uses a different web server than the listener of the Apex. right?

    Thank you once again.

    You have answered your own question... If you use the EPG, then you can NOT use another product middleware or application server until you turn off the EPG...

    Why you use the EPG in production?  Oracle does NOT recommend this (see the APEX Oracle installation instructions..)

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • Can I use Adobe Color CC for my commercial works?

    I have only free CC account, and I do not agree any service.

    There is no strict declaration on the commercial use of Adobe Color CC in the terms of use.

    I don't know if it is possible to use it in the creation of works for commercial purposes.

    Michael,

    Of course, you can use the themes you create with color CC for your commercial work.

    Sue.

  • RM-30410: WARNING: property single record ignored for the non-bloc command

    Hi gurus,

    I have a block, as oracle default behavious is that when any user between record and during that if he or she touches down arrow then he gets to the next record, I want to prevent this behavior.
    In other words, I want that user doesn't have to enter second disc and if he or she need enter then record after first saving and then user can do it if it navigate to your second time.

    In the property palette, I put Yes for single record but when I compile the form is for me after warning
    FRM-30410: WARNING: property single record ignored for non-employees control block
    Created the form file C:\my_forms\employees.fmx
    please seek help that how can I sort.

    Thank you
    Hina

    If he or she touches down arrow then it comes to the next record of new, I want to prevent this behavior.

    Pressing key or button-nxtrec block trigger change

    begin
      null;
    end;
    

    (or give the user a message "Unauthorized key" here).

  • Color change for the video rendering CS6

    I use to do a time lapse video cs6. When rendered in the format H.264 that there is a significant change in color. For example green grass looks like an almost cyan in the rendered file.

    I'm running Win7 64. My monitors were calibrated using a Spyder 3 Elite, and color management works perfectly for me in other areas (printing, etc.).

    What could be the problem here?

    Yes, most viewers won't use calbration or be aware of issues such as H.264 Gamam travel. This is why it is up to you to compensate them with adjustments.

    Mylenium

  • Change the color of the font after running a query

    Hi all

    I need to change the color of the font after running a query. I mean, according to the value of a column to say BRANCH_STATUS , the color of the font of this column will has changed.

    I applied the following on the times-news-block-instance trigger code, but I get all BRANCH_STATUS lines become same color:
    execute_query;
    IF: BRANCH_STATUS = "ONLINE" THEN
    SET_ITEM_PROPERTY ('BRANCH_STATUS', 'r191g223b191', FOREGROUND_COLOR);
    ELSIF: BRANCH_STATUS = "OFFLINE" THEN
    SET_ITEM_PROPERTY ('BRANCH_STATUS', 'R255g0b0', FOREGROUND_COLOR);
    ANOTHER NULL.
    END IF;
    I want to show a different color for different values of ' BRANCH_STATUS *.»

    Sorry, I'm wrong: in point-instance-property, there is no foreground property - set a Visual attribute and use it with

    SET_ITEM_INSTANCE_PROPERTY(..., VISUAL_ATTRIBUTE, 'your_attribute');
    
  • What is the display screen color recommended for fine arts

    I need to send pictures of my works so, what color recommended for my screen?

    Each monitor will interpret according to local settings of RGB. LCD monitor displays colors in this way, by combination of red, green and blue LEDS (light emitting diodes). It is an additive color model in which Red, green and blue are added together in various ways to reproduce a wide range of colors.

    You have no control over other peoples screens settings

    Make it look good on your is the best you can do.

    If you want to print CMYK is a subtractive color model, used in color printing, which you have control of the finished product.

  • Driver for G7 - 2251DX running windows 7 64 bit

    I need the driver for the laptop next

    HP Pavilion G7-2251DX

    Install windows 7 64 bit and can not find the driver for the following.

    PCI\VEN_1022 & DEV_780B & SUBSYS_184B103C & REV_14
    PCI\VEN_1022 & DEV_780B & SUBSYS_184B103C
    PCI\VEN_1022 & DEV_780B & CC_0C0500
    PCI\VEN_1022 & DEV_780B & CC_0C05

    Any help will be appreciated.

    Thank you

    Hello:

    Please see my response to your other post on the link below.

    http://h30434.www3.HP.com/T5/notebook-operating-systems-and-software/driver-for-G7-2251DX-running-Windows-7-64-bit/m-p/3819706

  • Color available for laptop to HP Pavilion m4-1004tx Notebook PC.

    i wonder if theres color from any other laptop to HP Pavilion m4-1004tx Notebook PC... When I'm checking the web it shows that there were two color available for this model. One was black and the other was black with metallic linning on the side. What is the difference of the two in the spec or just the color?

    Thanks in advance.

    Hello

    Different region will have produced different you can watch the last 4 characters to see the market for example, the number of product #ABC: Canada (French) (English) Canada #ABL, #ACF to the Japan (in English)... model 1004tx is on a region which means it can be any color available for this region, can be black or red...

    Kind regards.

  • Cannot access the options of color management for HP 6700 Mac OS 10.8.5 (Mountain Lion)

    Hello.

    I have the HP Officejet 6700 Premium e-all-in-one, and I can't find any way to access the color management options.

    The printer is attached (Wi - Fi) to my iMac Mac OS 10.8.5 (Mountain Lion).

    I want to correct a magenta cast for the photos I printed.  I had the problem of magenta-cast in Lightroom and use Preview to print the photos, so now I want to work with color profiles in Photoshop Elements.

    Photoshop Elements is recommended I have 'disable color management in the printer Preferences dialog box.

    However, I am not able to find for the 6700 color management preferences in settings under Mountain Lion:

    Not sub (Apple) > System Preferences > print & Scan.

    Not sub (HP utility) > Open Embedded Web Server.

    Not sub (HP utility) > the printer settings.

    Non-print preview dialog.

    I can't find any clear directions in the online help (HP or elsewhere) that I've read so far.

    Any suggestions would be most appreciated.

    Thank you!

    Michael

    Hello

    Thanks for the reply and the screen shot.

    The first thing I want to do you is to reset the printing system.
    OS X Mavericks: reset the printing system

    Then add the printer, however when it by adding not just click on the name of printers, click Add printer or a scanner. Make sure that the 'use' is set to the printer and not Airprint.
    If it is displayed as Airprint, you will be missing feautres compared to the actualy printers driver.

    After that, I'll provide you know several documents that you may find useful to perform this task.
    Documents from HP:
    Color management for the HP inkjet printing products new generation
    Advanced color management overview

    Apple documents:
    Mac OS X 10.6: edit images using ColorSync Utility
    Mac OS X v10.6: about ColorSync

    Document from CNET:
    How to use ColorSync Utility to assign color profiles in OS X

    I know some say 10.6, but they give you a reference and the idea, trying to do what you are.
    Please let me know if that helps.

  • How can I get the color codes for the notebook

    How can I get the color codes for the notebook?

    Hello

    What is the color codes for the notebook?

    Perhaps you need a 3rd party utility like GetDiz - Free and others to be
    found using BING or Google.

    GetDiz Notepad - free - replacement
    http://www.Outertech.com/en/Notepad-replacement

    I hope this helps.

Maybe you are looking for

  • Share custom color palette

    Hello I was wondering if there is a way to share / export of custom devices through Color Palettes? Searched in the color under the library file, but cannot find the file light.CLR in the custom palette, only "Apple.clr", "Crayons.clr" and "System.cl

  • What is the Arch of fire and what is its function?

    What is the Arch of fire and what is it ' s function?

  • How to access the BIOS on an Acer Aspire V3 - 571 G-9636

    How to access the BIOS on an Acer Aspire V3 - 571 G-9636. I want to disable UEFI and secure boot. I tried pressing F2, from switching on the laptop of a closed state. I tried to hit once, several times he spamming on boot to the top. The laptop still

  • E1P05AV: E1P05AV wireless and bt equipment

    I am trying to understand exactly what hardware wifi and bt is installed in my laptop HP Envy E1P05AV.  I can give a serial number if you need it.  My bluetooth continues to disappear from my system randomly.  Then I see an unknown USB device in my d

  • Why I have a FAT32 partition and how can I know what is on it?

    I tried to free up space on my hard drive and I went to disk management and discovered that I have a FAT32 partition.  This partition has a capacity of 2.9 GB and is currently greater than 90% full.  How can I find on which is stored here?  Is there