show and hide a text with a qml button

Hi, I have a button and when onClicked I want to display a label and with a second click it hide again, what is the best way to do this in qml?

Lable{
  id:lable
  text: "My Text"
  visible: false
}

Button{
  text: lable.visible? "Hide" : "Show"
  onClicked{
    lable.visible = !lable.visible
  }
}

something like this should work

Tags: BlackBerry Developers

Similar Questions

  • Show and hide the text in a page of questions / answers

    I need to create a FAQ page in Flex3. The page initially lists all questions with a "Show" button after each question.

    A click of a button 'Show', the answer to this specific question is inserted and displayed below

    the question and the button becomes "hide the answer.

    A click on the button "Hide the answer," despairs the answer to this question, the questions (and answers if there is)

    below moves upward to support the space and the button becomes «See the answer»

    Suggestions or examples? DataGrid with masking of rows? Directly using state transitions?

    I would use visible and includeInLayout properties

    Alex Harui

    Flex SDK Developer

    Adobe Systems Inc..

    Blog: http://blogs.adobe.com/aharui

  • More/less a link to show and hide more text in a report

    Hello world

    A lot of my reports having the description field run nearly 100 to 200 characters.
    So instead of display the description for users, why not display only partial data as first 100 characters and then followed with a link "more...". "to show to the rest and change the link in the «...» The '.
    Clicking less it should display only 100 characters.

    Can someone please shed some light on how to integrate this in a column in the report.

    Thank you
    Teku.

    Hello
    Replace the href onclick as below, and it should work.

    SELECT ...
    '
    '||substr(Long_column,1,100)|| 'more...
    ' LongColumn ...FROM...

    Note:
    javascript: is deleted.
    nCliquez should be replaced by onclick. Had to tweak it to be able to view the code.
    See you soon,.

  • Show and hide content on stage with the action of the button

    Hello...

    I created a button to show and hide certain content on stage. The button works fine, but there is a problem... when I click on the button to display the content and I move to another section of the timeline, hides the content again, and I just want that it to hide when the button is clicked again :-(

    Here is my code:

    Quote:
    Posted by: kglad
    and your a real button or movieclip button? If it's a button movieclip instead of btAcess use _root.btAcess and see if that solves your problem.

    Forget it! you were right, and it's really simple after all...
    just need to add _root variable btAcess: s

    Thanks once again kglad for the patience and most importantly, help ;-)

  • I created show and hide features in InDesign I want to export to interactive PDF format. These functions work when seen in Acrobat on the desktop, but not on iPad/Tablet - why?

    I created show and hide features in InDesign I want to export to interactive PDF format. These functions work when seen in Acrobat on the desktop, but not on iPad/Tablet - why?

    Why? Most likely because the PDF Viewer on the Tablet is too stupid to deal with show/hide functionality.

    You could try PDF Expert of Readdle on qpdf Notes Pro on Android and iOS devices.

    Depending on how the show/hide was created during the export of InDesign, it can work in viewers. Otherwise, you will need to open PDF files in Acrobat and edit features show/hide something more digests of PDF device viewers.

    BTW, you will encounter the same issues with the PDF display components in web browsers.

    I hope this can help.

  • Show and hide the scroll bar

    Hello!

    How could I show and hide the scroll bar attached to a dynamic text field depending on the size of the text?
    I tried different solutions based on bottomScroll and maxcroll, but nothing works...

    Thank you very much in advance for your help.

    Best regards
    Gerry

    If you use a text field, you can do a simple test:

    If (textInstance.textHeight > textInstance._height) {}
    show the ScrollBar
    }

    --
    Dave-
    Developer leader
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • Copy of a slide with a 'model' for the buttons to show and hide across multiple slides

    Here's my problem... I'm going through many different products that each have a similar style click on each slide.  The user can choose from 5 different catergories, when you click on one of the 5 buttons it shows the appropriate text box and hides one of the other visible text that can be opened from clicking on any other category.  When all the 5 keys were pressed game re bar appears allowing the user to continue.  It works just like a champion on a slide.  Here's my problem, although I need to duplicate this slide about 200 times.  When I duplicate, the name of the element in the text boxes so any change so my actions advanced making hide / display is no longer working.  Do I really have to create a new tip action for each text box for each slide with a unique name for the element? (I know that I can't have the same text on several slides box item name... at least I don't think I can).  I can do this, but there must be a quicker way?  What Miss me?

    I am using Captivate 5.5

    Very brilliant way to beat the system, I am impressed.  A problem, however, the text box must have a gray background to make the text readable, and for some reason when the variable positions within the text are it is overlooking the sid on the left of the box by a character.  Everything else seems to fit but not that. See slide below and the "Drytime" box to the right illustrates my problem.

  • Show and hide the symbols on the click event

    Hello

    I have 4 text overlays. Each of them can be clicked and opened individually. Any combination of them could be opened at any time. It can also be closed individually buttons within the same window.

    In the assets Panel, I have a set of buttons that sit on the text overlays. What I want to do is to start with the visible buttons. Once all 4 text overlays is open the buttons are hidden. Once all 4 text collections are closed the buttons must be visible again.

    I would be grateful for anyone's help.

    You can set your buttons to display off the coast in the interface user, then show(); in your case.

    Example:

    SYM.$('elementName'). Show();

    You can use an indicator of close all when the flag is true:

    Insert a variable in each symbol example

    A = 1;

    B = 1;

    C = 1;

    D = 1;

    then have a conditional in each event which will check the variable

    If (A == 1 & B == 1 & C == 1 & D == 1) {}

    code to display your buttons

    } else {}

    code to hide your buttons

    }

  • Show and hide multiple items using wildcards in advanced Actions?

    Is there a way to show or hide multiple items at once by using a wildcard character in advanced Actions?  Ex: Hide all the boxes to click in the presentation that begin with click_ *.

    I'm trying to find a good way to use the same CBT to show me Mode (demo video with audio and no interaction) and the practice Mode (interactive simulation with boxes to click and prompt text box for interactions).

    I saw a few business solutions have the ability to have 1 source file that publishes on multiple formats (demo, simulation, quick guide).  However, they are a little more than 800 $de Captivate.

    Micky

    If I want to create a combination, I capture in all modes search and then copy and paste what I want one of the files? An example, but it's on a Dutch version of my blog, watch movie (power of lightning, hope, that you will always be able to see SWF?):

    http://captivatenederlands.posthaven.com/classic-tutorials

    Lilybiri

    PS as for your original question: no wildcard in advanced actions. You can filter drop-down lists on "click_" and only objects will appear then (in CP6/7) but you will still need a single statement by click box unless you group boxes click on a slide (impossible to group objects sitting on different slides).

  • Show and hide tabs

    I want to use my application with different users (with a different authorization) and
    I have to parent 12 navigation tabs.
    But depending on the user (permission) I want to show or hide the parent tabs.
    Is this possible in Apex?

    I also have a second question:
    I want to make changes in the CSS for the appearance of the tabs in my theme (topic 13). But how do you do that?
    I tried on different ways, but it does not work.

    1. I tried to use inline styles in my template on the page 'two level Tabs '.
    I put the style of style inline = "color: Green;" in the tag DIV with id = "t13PageTabs", in the TR tag but nothing works.

    2nd I tried to make a copy of the original CSS, and then make the changes in the CSS for the classes in the following tag:
    -a: link, a: visited
    -a: active,: hover
    -span. OnC
    -span. Creancesc a: link, span. Creancesc a: visited
    -span. Creancesc a: hover
    After the changes I load the CSS file (with a different name) through Shared
    Components-> Cascading Style Sheets and change the href attribute in the link to the CSS tag
    in the header of the page 'Two level Tabs' but who do not work also.

    My questions are so follow them... Can I change the style of the tab (I mean just the color of the text in the tab)?
    And how do you do that?

    Somebudy can help me...

    Hello

    Question 1: Go to Edit tab and use the conditional display settings.

    Question 2: Go to the page template that you use and modify attributes of the tab Standard.

    See you soon

    Ben

  • Show and hide some fields against a number

    I have a form for number of dependants and their insertion of names. A user can insert maximum 5 number of dependents, so total I have 6 fields, for the insertion of several dependends and 5 others to insert their names,

    I want to hide all five fields of dependents in the form, and if the user makes any number less then 6 then filleds should be visible depending on the number the user will be in put.

    I tried but I get no success, I used a dynamic insertion for if the user enters 2 or 3, but it does not work. I used two action individually for 2 and 3. but without success.

    Need advice on this.


    Thanks in advance

    Concerning

    Mazahir Abbas

    Hello

    You can show/hide elements based on the value entered in a number of ways.

    Here is an example: http://apex.oracle.com/pls/otn/f?p=12983:9

    Who uses dynamic Actions. That the user changes the value of 'Count', individual text fields are shown/hidden depending on the value selection. In this example, there are five dynamic Actions on the page - one for each of the possible values and related items.

    Each action has the following parameters:

    Event: change
    Selection type: item (s)
    Article (s): P9_COUNT (which is the selection list)
    Condition: greater than or equal to
    Value: * 1 * (for the first article of dynamic Action, then 2, 3, 4 and 5 for the other)

    Real Action: show
    Fire on the page loading: true
    Selection type: item (s)
    Article (s): P9_ITEM1 (for the first point of dynamic Action, P9_ITEM2 etc for the others)

    Action of false: hide

    Fire on the page loading: true
    Selection type: item (s)
    Article (s): P9_ITEM1 (for the first point of dynamic Action, P9_ITEM2 etc for the others)

    When a Count is selected, all dynamic Actions will trigger - each will control the display of the text elements. If the selection is 3, the first three dynamic Actions will show the first three text elements and the last two actions allows you to hide the text elements.

    Andy

  • Illustrator CC 2014 - Script to show and hide sublayers of name before exporting

    Hello

    I'm looking for a way hide and sublayers by name in Illustrator CC 2014 so that I can export each image as an action. I currently have an action for export, but I am unable to display and hide sublayers of name before as I have the export unless I do it manually.

    show and hide sublayers.png

    Step #1: Sublayer "gray 1', the visible value.

    Step #2: Export image.

    Step #3: Primer 'Grey 1' set to hidden.

    Step #4: Primer 'Gery 2' the visible value.

    Step #5: Export image.

    Step #6: sublayer 'Gray 2' set to hidden.

    Etc...

    Can I use a script or is there another way I can do this automatically without having to manually select each sublayer, and then export?

    its not easy at first, but once you get the hang of it, it is not difficult

    in a Word

    -create a variable of visibility for each object that must be changed, or get hidden at some point, 1 grey, grey 2, etc.

    -Gray cover 2, 3 grey, grey 4

    -make a set of data

    -Hide grey 1, gray unhide 2

    -make a set of data

    -Hide gray 2, gray unhide 3

    -make a set of data

    -Hide 3 gray, unhide Grey4

    -make a set of data

    then navigate with the arrows to view each set

  • How to fire the show or hide a symbol with the label of the timeline to another symbol? THX

    Hello.

    Basically what I need is for "Symbol_A" to show when the chronology of "Symbol_B" hits "label_1" and hide when the chronology of the hits "Symbol_B" "label_2".

    Add to label_1:

    sym.getComposition () .getStage ().$("Symbol_A").show ();

  • How to increment and decrement a counter with a single button

    Is there anyway you can increment and decrement a counter using only one button?

    I want this counter in place so that when I leave the stage and go back to it, the visibility of my button will remain the same because of being linked to the meter number.

    What would be the best way to implement that it doesn't work when I do it this way.

    function show_hide_MC(evt:MouseEvent):void {}

    MC.visible =! MC.visible;

    (Counter = 0) = (counter = 1);

    }

    btn.addEventListener (MouseEvent.CLICK, show_hide_MC);

    Thanks in advance!

    You can use a Boolean value (true/false) rather than a meter to keep track / affecting visibility.  You can use the counter simply to determine if you are starting the file or not.   When you click this button, you set the mc.visible property, and then assign the Boolean value of the visible property of the mc.

    var mcVisible:Boolean;    These two variables need to extend the length off the coast of the timeline
    var int count;

    if(Count == 0) {/ / you just started things so set up}
    mcVisible = mc.visible;
    Count += 1;
    } else {}
    MC.visible = mcVisible; you refer then set the visibility of the mc
    }

    function show_hide_MC(evt:MouseEvent):void {}
    MC.visible =! MC.visible; Toggle visibility
    mcVisible = mc.visible;    Remember how you left it
    }

    You can just use the number of establishments, incrementing every time that you click the button and using the module to determine if it has been clicked on an even number of times compared to an odd number of times, and then have a conditional that tests, which affects visibility... something like...

    var int count;           will start with a default value of 0

    We need to increase the length of the timeline

    If (count %2 == 0) {/ / this is the same value}
    MC. Visible = true;
    } else {/ / this is an odd value}
    MC. Visible = false;

    }

    function show_hide_MC(evt:MouseEvent):void {}
    MC.visible =! MC.visible; Toggle visibility
    Count += 1;

    }

  • Responsive Design - Show and hide the div tags

    Hello

    I am building a website using sensitive design. I want a certain div tag to be read on a desktop and a tablet but then to disappear and a different div be made visible on the mobile device.

    I realized the above with the code below, but I found a problem. The problem I found is that the div is hidden here still an empty space remains there then it creates a large empty space. Anyway is to hide this great space?

    (mobile)

    {#tab-container}

    display: none;

    visibility: hidden;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 96%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    }

    {#phone-tabs}

    display: block;

    visibility: visible;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 96%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    line-height: 30px;

    }

    (Tablet)

    {#tab-container}

    display: block;

    visibility: visible;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 96%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    }

    {#phone-tabs}

    display: none;

    visibility: hidden;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 96%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    }

    (office)

    {#tab-container}

    display: block;

    visibility: visible;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 70%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    }

    {#phone-tabs}

    display: none;

    visibility: hidden;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 70%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 0px;

    padding-bottom: 0px;

    text-align: center;

    border-top-width: 0px;

    border-bottom-width: 0px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

    }

    Thanks for your help!

    Alex

    Try to delete the two lines, as shown below.

    Display: block overrides display: no because it is further down in the code.

    For this reason, visibility: hidden comes into play. This statement is exactly intended to hide the contents, while leaving the blank space.

    Edit: I think that really is all you need:

    {#tab-container}

    display: none;

    }

    (mobile)

    {#tab-container}

    display: none;

    visibility: hidden;

    Clear: both;

    float: none;

    left margin: 0;

    Width: 96%;

    display: block;

    margin-right: auto;

    left margin: auto;

    padding-top: 10px;

    padding-bottom: 10px;

    text-align: center;

    border-top-width: 1px;

    border-bottom-width: 1px;

    border-top-style: solid;

    border-bottom-style: solid;

    border-bottom-color: #000;

    border-bottom-color: #000;

Maybe you are looking for

  • can't download movies itunes to the child's account

    I have active sharing family and expressed the box shopping as well.  I have several itunes movies available.  And I can download them from an adult account.  The problem is my ipad for children shows them as purchased and not on their ipad.  But whe

  • Pavilion Touchsmart 14 n056sa screen touch tempremental

    Hello, I've had the laptop a week. The touchscreen works at first, but as soon as I use the touchpad it turns off by itself. He appeared to stop working randomly once too, but I don't know for sure my wrist was not touching the touchpad. I went to th

  • Problem with the connection to USB6008 OR LabWindows

    Hello world I make a program in LabWindows and so far, I've had two instruments running without any problem. But I try to add a USB6008 OR the program. I downloaded something called "NIDAQmxBase" and has added a file called "NIDAQmxBase.h" but I can´

  • Manual removal of Trojans

    I did a scan with the Microsoft Safety Scanner. He finds a few horses Trojan, eliminated an and partially removed the others. On those who were only partially removed, it says "manual steps" e.g. Win64/Alureon.gen! Partially removed H, manual steps r

  • kb2707511 shows that it is installed but appears always that the update is ready to be installed.

    kb2707511 shows that it is installed but appears always that the update is ready to be installed. I uninstalled it down loaded the file and reinstalled, still the same thing, Fix - it Ran no problem detected, a suggestion? Windows xp home Service pac