Button rounded with gradient field

Hi, I'm creating a button field that is a rounded rectangle with a gradient.  I need to have the gradient have the following format:

DARK COLOR

COLOR OF LIGHT

DARK COLOR

Need some advice, I used

http://www.deepgraysea.com/bbroundedrect.htm

to get the basics but im struggling to match the format degraded.

Anyone know of a site or a code that could help me

Thank you

Here's a post earlier (if you searched for "degraded" you would have found yourself) which deals with this problem:

Re: color of the gradient in JDE 4.5

At the time I was wrong not to be able to use drawShadedFilledPath under pre - 4.6 (you can!), however, so you should be able to just use the code in the article cited with minimal changes (just to throw out all calls setBorder and setBackground). My code, however, shows how to create a color gradient Bitmap yourself, which might be useful for you anyway...

Good luck!

Tags: BlackBerry Developers

Similar Questions

  • text with button in highlighting a field

    Hi guys. I have Field1 with no editable, scrollable text and below Field2 theres where the user writes a word which must be found in Field1. The works of highlight, because I wrote the word in the Field2 and press on enter. I want that the search for work by pressing a button and don't not by pressing the Enter key, but I couldn't make the connection between the button behavior in the fields.

    These are the behaviors that I've linked to the fields, or you can see the file attached dir:

    Field1

    pMemRef property
    pStartColor property
    pHiliteColor property
    pWholeWord property
    pStatusMem property

    on beginSprite me
    pMemRef = sprite (me.spriteNum) .member
    pStartColor = pMemRef.color
    pHiliteColor = color (#rgb, 255, 0, 0)
    pStatusMem.text = EMPTY
    me.resetMyColor)
    end

    on setWholeWordSearch me, flag
    pWholeWord = flag
    end

    on resetMyColor me
    pMemRef.color = pStartColor
    end


    on hiliteWord me, Word search

    If it isn't voidP (wordSearch) then
    If <>wordSearch EMPTY then
    me.resetMyColor)
    tempStr = pMemRef.text
    hiliteList =]
    counter = 0

    Repeat all (Word search, tempStr) offset

    startChar offset = (Word search, tempStr)
    endChar = startChar + wordSearch.char.count - 1

    flag = true

    If pWholeWord then
    prevChar = tempStr.char [startChar-1]
    nextChar = tempStr.char [startChar + wordSearch.char.count]
    charString = "abcdefghijklmnopqrstuvwxyz"
    If charString contains prevChar or charString nextChar then
    flag = false
    end if
    end if

    If flag then
    hiliteList.append ([counter + startChar, counter + endChar])
    end if

    remove the tank 1 tempStr endChar
    Counter = counter + endChar

    end repeat

    If hiliteList.count > 0 then
    Repeat with i in hiliteList
    pMemRef.char [i [1], [2] i] .color = pHiliteColor
    end repeat
    If hiliteList.count = 1 then
    pStatusMem.text = "There is 1 game."
    on the other
    pStatusMem.text = 'On' & & hiliteList.count & & "corresponds to.
    end if
    on the other
    pStatusMem.text = "There have no match."
    end if

    end if

    end if
    end

    on getPropertyDescriptionList
    return [#pStatusMem: [#format: #text, #default: 0, #comment: "Member text select status:"]]
    end

    and Field2

    pMemRef property
    pTextSprite property

    on beginSprite me
    pMemRef = sprite (me.spriteNum) .member
    pMemRef.text = EMPTY
    end


    on keyDown me
    If the key = BACK then
    sendSprite (pTextSprite, #hiliteWord, pMemRef.text)
    on the other
    Pass
    end if
    end

    on getPropertyDescriptionList
    return [#pTextSprite: [#format: #integer, #default: 1, #comment: ' enter text sprite number: "]]
    end

    Here is a way. On your behavior of field 2, add:

    on hiliteText me

    sendSprite (pTextSprite, #hiliteWord, pMemRef.text)

    end

    And change it in your keyDown handler

    If the key = BACK then
    sendSprite (pTextSprite, #hiliteWord, pMemRef.text)

    on the other

    TO:

    If the key = BACK then
    hiliteText (me)
    on the other

    And on your sendSprite, sendAllSprites or button (, #hiliteText)

    on mouseUp me

    sendAllSprites (#hiliteText)

    end

    --
    Mark A. Boyd
    Keep-on-Learnine :-)
    If you read this e-mail, you should know that he cannot be an accurate representation of my message. Login to read the actual message and answer.

  • [ADF, JDev12.1.3] SelectOneChoiche created from VO instance with 3 fields: how to retrieve the value of all the fields of the selected element?

    Hallo,

    I defined a VO with 3 fields (A, B and C) and I would like to create a SelectOneChoiche that shows only the field as options from this instance of VO.

    In a managed bean, I need to retrieve the values for all areas (A, B and C) of the item selected by the user.

    I started dragging the entire VO instance to UI to create a SelectOneChoiche (in which I have chosen to show only the to field).

    Then, I created a for the SOC ValueChangeListener read the values A, B and C of the selected element, but the only thing I've done is to get the displayed value:

    System.out.println((String) ((RichSelectOneChoice) FacesUtils.findComponent("MySoc")).getValue());
    

    You kindly help me?

    Thank you

    Federico

    Federico, sorry I didn't see your answer.

    As you use 12.1.3 you can do this more easily than the code that I posted before. You can use

    {} public void onCountrySelection (ValueChangeEvent valueChangeEvent)

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    the newindex in not necessary, but ok let's get it (must be equal to the CountryId, the pharmacokinetics of the binding of the lov

    String newindex = (String) valueChangeEvent.getNewValue ();

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    The form that I use is based on the location of the HR DB schema table. The CountryId is configured in the view object to display a lov based on the campagneVoir. This view contains thre CountryId, CountryName and RegionId attributes.

    If you want to get to the attributes of an action listener you can use this code

    {} public void onGetSelectedCountryLov (ActionEvent actionEvent)

    BindingContext lBindingContext = BindingContext.getCurrent ();

    BindingContainer lBindingContainer = lBindingContext.getCurrentBindingsEntry ();

    List JUCtrlListBinding = lBindingContainer.get ("CountryId") (JUCtrlListBinding);

    get the selected value in the list that is the selected line of the binding of the lov

    Line lFromList = list.getSelectedValue () (line);

    now, we can get the attributes of the line of lov

    String s = (String) lFromList.getAttribute ("CountryId");

    System.out.println ("CountryId:" + s);

    String s2 = (String) lFromList.getAttribute ("CountryName");

    System.out.println ("CountryName:" + s2);

    BigDecimal s3 = lFromList.getAttribute("RegionId") (BigDecimal);

    System.out.println ("RegionId:" + s3.toString ());

    }

    You must add the valueChangeListener and at least add the lines

    FacesContext will involve = FacesContext.getCurrentInstance ();

    Make sure that the selection change is processed and the current link lov line has the new selected line

    valueChangeEvent.getComponent () .processUpdates (contxt);

    to ensure that the selected line is available when you click the button.

    And set autosubmit'= true for the field in the UI that displays the LOV.

    Timo

  • Idea about the creation of the registration with blank fields

    Hi friends,
    I am trying to build a small application where the first page of the application will be the home page. On the homepage, I have register, Login and home buttons. By clicking on the registration link, I want to go to the page where the page with blank fields. How can I view the fields blank when the page is displayed for the first time. I've linked the data control on the page. But when the page appears, it seems, with the data. Also I want to have a cancel button pressed to invalidate or to write off the new record created. How can we achieve this? Any idea.

    Thank you

    User, please tell us your Jdev version!

    A form with fields related to the vo for example shows the data out of the current line. Top get an empty fields, you must create a new line before you navigate to the page to display the form. Your use case can be applied if you call creatInsert inn the vo holding you back data, then go to the screen, allow the user to fill in the data. If the user cancels the cancellation of appeal form to remove the new line, if the user has saved the form validation data in the db.

    Timo

  • Prevent the signing with blank fields

    Hi all

    Ive tried many solutions to this problem in the last two days. My question is:

    1. I have an adobe form that contains more than 400 fields, radio buttons etc... all are assigned to required as the form should be filled out completely. i.e. "N/A" placed in text boxes and selected among the choice of radio button for fields that do no apply. It is extremely important to ensure that the form is completed correctly.

    2. before the signing, all fields are in check as filled in. (I'm using a button and hide the field signature for this currently)

    3. after the signing of all the fields must be locked for read-only and cannot be changed.

    4. the report must be just completed and returned by e-mail rather than the option 'submit form', which makes the option useless required field, the form will not be verified prior to submission. Therefore, I am trying to implement the audit before signing to take place.

    I tried javascript and a button of signature that hides the signature field until a statement on each individually named text box and radio button checked that none have been left blank, but with more than 400 areas and multiple forms for it to perform on this is an arduous and time-consuming task I want to avoid as much as possible.

    is there a faster solution for, e.g. check all text? (Note: unique names for each - a task that took an age in itself)

    got my answer.

    this.getField("Document_Sign").hidden = true
    var emptyFields = [];

    for (var i = 0; i)

    var f = this.getField (this.getNthFieldName (i));

    If (f.type! = "button" & f.required & f.display == display.visible ") {}

    If ((f.type=="text" && f.value== "") |) ((f.type=="checkbox"_||_f.type=="radiobutton"_f.type=="radiobutton") & f.value == "Off"))

    emptyFields.push (f.name);

    }

    }

    If {(emptyFields.length>0)}

    App.Alert ("error! ("You must fill in all required fields: \n");

    }
    else {This.getField("document signed"). Hidden = false}

  • How to execute a JavaScript script associated with interactive field?

    I need to perform a virtual a plugin click. Say a set of 3 button to check/radio fields have the value of exports:

    -Yes


    -No.


    -Maybe

    I have a script which indicates that was clicked almost the button of "Maybe". All I have to do is find which radio buttons:

    radioButton #0

    radioButton #1

    radioButton #2

    contains the export value of "Maybe". So far, this task is very doable. My question is how to do the following:

    I need to call the JavaScript Shell and run it, using as argument the code JavaScript associated with the top of the button mouse.

    Any help will be most appreciated...

    TIA,

    -Ramon

    IF you try to do it from a plugin - I would use just Cos API to obtain the appropriate JS of the action of the field dictionary and then pass it to AFExecuteThisScript().

  • How can I make the popup with empty fields and create new record?

    I would use a popup create new record.
    I created an af:popup drag and drop a data control VO in jsff. Then, I created a button and place an af:showPopupBehavior. I was able to pop-up window by clicking on the button.
    However, the window filled with information from the record 1. and when I select a record in the table and click on the popup, the popup is filled with this record.
    How can I make the popup with empty fields and create a new record by recording the popup?
    Thank you

    Hello

    You must call the CreateInsert for the underlying ViewObject operation when opening the popup because it does not allow to clear the input field, you must have a new record created

    Frank

  • Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions removed. Check with many types of malware scanners.

    Firefox crashes in typing or by clicking check box or the radio button, even with all the plugins / extensions disabled, then deleted. Sometimes it hangs for five minutes. I checked the PC with several types of scanners of evil-ware, but none to be found. All hidden and deleted cookies, all DELETED & extension plugins. Remove all instances of Firefox PC and registry, then restored to bookmarks. The only thing that I did not is to remove and reinstall not my favorites.
    Windows Vista (yes I know) and FF 13.0.1

    Try disabling hardware acceleration in Firefox.

  • How to export the graph xy with indicator field.

    Hello

    I want to export my chart to the .emf format. For this I used call node > image export. If I use this, I can only export the chart not another indicator filed(numeric_and_string_indicatror).how can export chart with flag field?

    This is .vi I used.

    Thanks for your post in our Discussion Forum,

    is it necessary to export the image to the .emf Format?

    If not, I can give you two options:

    The best way to make a screenshot of a certain area of the façade is of

    create a Subvi with all the items you want to take a screenshot of and

    Then take a screenshot of the entire façade of the Subvi.

    It works fine even if the front is not visible, while the photo is taken.

    The screenshot can be taken with a method node as in the example attached to this post.

    Another possibility is to reframe a screenshot of an entire façade to the region you are interested in.

    How this works is described here: http://forums.ni.com/t5/LabVIEW/take-screenshot-of-part-of-front-panel/td-p/1613750

    The downside is that you must manually set the region that could change because of the scrolling or changes on the Panel.

    Best regards

    Peter

  • I want to send an email manually with the fields email drives custom object? Is this possible?

    I want to send an email manually with the fields email drives custom object? Is this possible?

    Hey,.

    Yes, however, the object record Email custom fields only fill with default values. For the custom field object Record is filled, it must be sent via the event Actions or a generating program so that he knows in which case it is associated.

    Thank you...

  • Hide the individual fields of a group (radio button) based on another field

    Looked through the archives, but couldn't find the answer, who worked... THANKS in advance.

    A form that contains a radio 2 field (named funding) group - 'Cash' or 'other '.

    The group following (FinancingType), which is independent now, is a group of radio buttons of the 5 field - "Cash", "FHA", "GO", 'Classic' and 'other '.

    "Cash" is selected in the first group, I want to [FinancingType]. Button of Cash to choose (what I work via a trigger MouseUp)

    If (event.target.value == "Cash).

    this.getField("FinanceType").value = 'Cash ';...

    However, I want the other 4 fields greyed out or hidden.

    In addition, if the radio button "Other" is selected, I want to [FinancingType]. Button of cash to be gray or hidden.

    (ps. I know just enough coding to get in trouble!)

    Yes, you can. The code would be:

    this.getField("FinanceType").readonly = true; or false, change it back

  • How to query the data of Contact with multiple fields

    How can I query the data of Contact with multiple fields?

    For example, I'll get contacts which are changed after a point at the specified time and whose country is US. How could I make the chain of research of the SOAP API "Query"?

    And I also want to know how to make a search term for RESTful API for contacts above.

    Any suggestions?

    Thank you.

    Hi Biao,

    The following document describes how query for multiple fields using the SOAP API: request a Contact from several fields.

    And you can search multiple fields using the REST API with the & operator. For example, to search for a Contact by e-mail address and date of creation:

    Hope this helps and please let us know if you need more information.

    Thank you

    Fred

  • Send an E-mail link with merge field

    I am preparing an email that will come "from" beneficiary relationship managers (RM).  In the email will be the Mr e-mail address.  I would like to make the clickable address so that it creates a new email from the platform of e-mail recipients.

    How can I encode the email so that email address is dynamic based on the database information (merger of field)?

    Thank you.

    You might want to try: Officer_Email1"> Officer_Email1

    Technically, we do not use merge field twice. We are inserting a mailt to post a link (with the field even fusion) for the merger of field we have first inserted

    Hope this helps

  • How can I send a document by e-mail in PDF with editable fields, drop-down boxes and check boxes?

    Our company uses Adobe Reader as well as the version where send you it for signature, convert to word, excel etc.

    What we are trying to do, however, is create the PDF document, save it to our readers of local network for use in a format PDF with editable fields, drop-down boxes to select and check boxes.

    Can you help me please?

    See you soon

    Lucinda

    Hi lucindab50782713,

    Yes, you can save the document as a model using eSign service create a library template | services eSign so that it can be reused.

    Kind regards
    Nicos

  • Is it possible for someone to insert a logo when you fill out a form to fill out? I'm looking for all the options under the button 'add a text field.

    I have created a form to fill out that is a contract, but I need a way for the person who is to fill the form to insert their logo.  Is it possible for someone to insert a logo when you fill out the form to fill out? I'm looking for all the options under the button 'add a text field.

    It is not possible within a text field, either. If they have Acrobat, they can use the built-in under Tools - editing content Add Image tool.

    If they drive XI or higher, they can use a button form field you will need to set up for them, but the image must be in PDF format.

Maybe you are looking for