Issues in making label selectable when used with text area

I have used the following code (which was given in the thread : Re: Making Labels and other controls with text selectable for copy&paste ]
which shows how to make label selectable with text field. )
public class TrialArea extends Application {
>>public void start(final Stage stage) throws Exception {
>>StackPane layout = new StackPane();
>>layout.setStyle("-fx-background-color: cornsilk; -fx-padding:10; -fx-font-size: 20");
>>
>>Label label1 = (new Label("jqhrjhhhhhhdsfdsfdsfdfdsdsfsdfdsdsdsfsddsdsdfsdfsddsfsfsddsfdsdedsfssdfhhhhhhhhhhhhhhhhhhhhkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\njqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\njqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\njqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\n jqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\n jqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\n jqhrkjhejwqrhjwhj ewjrhewjkrjew ewjhrjewjwke \n qwjkhrjkwerehw \n jkehrkjewhrjkew\n "));
>>
>>label1.setWrapText(true);
>> label1.setPrefWidth(480);
>>label1.setMaxWidth(480);
>>layout.getChildren().add(
makeSelectable(label1)
);>> Scene scene = new Scene(layout);
>>stage.setScene(scene);
stage.show();
/** @return the passed in label made selectable. */
private Label makeSelectable(Label label) {
StackPane textStack = new StackPane();
TextArea textField = new TextArea(label.getText());>>
>> textField.setEditable(false);
textField.setWrapText(true);
textField.setStyle(
" -fx-background-color: transparent; -fx-background-insets: 0; -fx-background-radius: 0;"
);>>
>>
// the invisible label is a hack to get the textField to size like a label.
Label invisibleLabel = new Label();
invisibleLabel.textProperty().bind(label.textProperty());
invisibleLabel.setVisible(false);
>> textStack.getChildren().addAll(invisibleLabel, textField);
label.textProperty().bindBidirectional(textField.textProperty());
label.setGraphic(textStack);
label.setContentDisplay(ContentDisplay.GRAPHIC_ONLY);
return label;
public static void main(String[] args) {>> Application.launch(args);
>> }
}The issue I am facing is that with text area, the scroll bar is visible, which does not go with label. The label is being selected properly, but how to remove the scroll bar?
Edited by: Amrita Dasgupta on Mar 11, 2012 11:38 PM

DVD SP is not Flash or Director and it sounds like you using "hotpots" are thinking more along those lines. If someone puts the DVD in a DVD Player they may get rather frustrated having buttons that do not do anything and the navgation is strange
Also take a look here for some more pitfalls and why another app may be better for you
http://discussions.apple.com/thread.jspa?messageID=1085629

Similar Messages

  • Drop down menus on iPad, the first selection in the drop down will not load as a selection when using safari, what can I do?

    Drop down menus on iPad, the first selection in the drop down will not load as a selection when using safari, what can I do?  I use this for my mobile, on-site auto repair business and not being able to call up repair and diagnostic info and reference for some cars is troublesome for sure. It works fine on the computer and I have installed a remote desktop app as a workaround but it is unreliable because the desktop is not business dedicated and may be off or in use at the time. So is there a known fix for this?
    Let me paint a more descriptive picture, visualize 4 drop down selection menus, first one is for year, next one is for make, 3rd one is model and the last one is for engine size/type. If I wanted to choose a 2012 vehicle it wont work because it is the top selection on the list. This can be forced by selecting any other year and then coming back to 2012. Ok fine, but then let's say I wanted to choose Acura as the make, well it won't take it because again it's the top selection. Again you work around it be selecting any other make and coming back to Acura. Ok now select the model, same trend follows. But now since most Acura vehicles come with dedicated engines and no optional engines I have only 1 selection in that final drop down menu and it will not take my selection and therefore never let me proceed to the info I need.
    This is also true when ordering parts from my wholesaler's website, they use drop downs and I can only get to that last drop down and then I'm stuck. This is blindingly frustrating, what options do I have. I'm not opposed to any avenue at this point.

    Did you ever figure this out? I bought my iPad last week to use in my business as well. I assume you are trying to use alldata? That is where I noticed this same issue. I had problems with identifix working with safari but downloaded a different browser and that works fine. Alldata does not work with either browser. The main difference is that on identifix if there is only one engine selection, it automatically selects the only option and continues to the home page. With alldata you have to make the selection manually even if there is only one option. Honestly if I can't get this to work I am going to return the iPad as it looses a significant amount of usefulness to men

  • Test runner freezing when used with Dynamics CRM (and other apps) - Both applications freeze and never come back...

    We are trying to use test runner with dynamics CRM.
    MS Dynamics CRM will freeze and will not respond (even after 10 - 15 minutes). When this happens, the test manager will either freeze or a message will apear saying "waiting for application under test".
    We are not recording action recordings...This makes using test manager impossible. It happens consistently, starting with slowing the PC down (mouse moving slowly, slow to load in new screens, drop downs etc) eventually leading to the app freezing.
    Tried on windows xp, windows 7 etc on various specs of pcs.

    I am experiencing this same issue with
    Test runner freezing when used with Dynamics CRM. I notice this was first posted in June of 2010 and so far no
    resolution? I was wondering if it could be related to memory issues? Do you have any troubleshooting ideas? The
    issue for me seems to be sporadic and I can't
    reproduce it every time.
    The message I get is "waiting on application under test".
    DLM

  • Camera is hanging when using with flash

    Hi Lenovo Team,
    In lenovo vibe x2, camera is hanging when using with flash.Getting "Lenovo snapit isnt responding" error and screen hanged for sometime.after that when tried to open camera "Cannt cannot to camera " error is coming till when restart the phone.
    Even tried Factory reset and software update.
    Please provide the solution for the above issue.
    Thanks,

    Hi vijayprabhu,
    I just tested the X2 however am not having the issue. I set flash to always on then took a picture using SnapIt however its fine.
    Please check if you have the latest firmware S125.
    Check out the Community Knowledge Base for hints and tips.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    X240 | 8GB RAM | 512GB Samsung SSD

  • I have created a PDF with mp3 audio clips, the file works on PC's with audio playback (WIndows 7, 8 ) however the audio does not play when hosted on a website or an ipad/tablet computer or smart phone when used with PDF reader

    I have created a PDF with mp3 audio clips, the file works on PC's with audio playback (WIndows 7, 8 ) however the audio does not play when hosted on a website or an ipad/tablet computer or smart phone when used with PDF reader

    adobe42135678 wrote:
    the audio does not play when hosted on a website...
    When viewing in what browser?

  • ExecuteNonQuery doesnt return number of rows affected when used with PL/SQL

    ExecuteNonQuery doesn't return number of rows affected when used with PL/SQL but returns -1. The documentation says ExecuteNonQuery method of OracleCommand returns the number of raws affected but when used with PL/SQL, it returns -1 even the update statement successfully executes and affects multiple records with no exeptions thrown.
    However, if ExecuteNonQuery is used with update sql statement in the asp.net code it returns number of rows affected correctly. Does anybody know why ExecuteNonQuery behaves like this?
    I am using ODP.NET that comes with Oracle Client 11g. The version is 2.111.6.20 of ODP.NET, Oracle database server is 10g.
    Marat

    You can get the rowcount in the stored procedure via SQL%ROWCOUNT and then pass it out as a parameter.
    For example:
    SQL> create or replace procedure updatesal(v_deptno in number, v_rowsaff out number) as
      2  begin
      3  update emp set sal = sal * 5 where deptno = v_deptno;
      4  v_rowsaff := SQL%ROWCOUNT;
      5  end;
      6  /
    Procedure created.Cheers

  • Quicktime Player with the magic mouse, when used with a bug -

    On 10.7 Lion, Quicktime Player with the magic mouse, when used with a bug …
    Quicktime Player will not respond, but use the USB mouse with no problem

    Message was edited by: b j t

  • Msi x99 gaming 9 ack does not detect capture card when using with xsplit

    msi x99 gaming 9 ack does not detect capture card when using with xsplit
    i install every but still it does not work.

    Hi
    It wasn't hard to find your motherboard version:
    http://www.msi.com/support/mb/Z68AGD80_B3.html#down-bios
    Since your BIOS is v20.1, it couldn't be G3 
    Apart from checking BIOS, you can only check motherboard or moth...

  • When using large text my lines overpal, how can I increase the line spacing?

    When using large text my lines overpal, how can I increase the line spacing?

    Press 'Ctrl + Enter' after the numbered item to insert blank space below it. If you press 'Enter', the next line will start with the next number. As long as you want to type lines without a numbering, press 'Ctrl + Enter' and type the line.

  • When using the text to speech which vtml_speed value is the best?

    When using the text to speech function along with the VTML tag for speech (<vtml_speed>) what number provides the best rate for learning. I am currently trying to use this function to improve my computor generated speech for a project. I have been getting complaints that it is too slow, yet the default setting is too fast. Any advice out there?

    Hopefully nothing serious. Try a Safe Mode boot ...
    A Safe Mode boot takes a longer than a normal boot so be patient.
    Once you are in Safe Mode, click Restart from the Apple () menu.

  • Is the component uiscrollbar for use with text fields only

    Is the component uiscrollbar for use with text fields only?

    Yeah, it isn't in the library, you need to call it up using code.  It is documented in the help files though, so that should help you get it into use.

  • TS4185 i have a macbook pro and when using FaceTime people are unable to hear me, even though i can hear them

    I have a macbook pro and when using facetime people are unable to hear me, even though i can hear them.

    I have a macbook pro and when using facetime people are unable to hear me, even though i can hear them.

  • When using the text box( typewriter ) It appears black but when I click away it is a lighter grey. I am using Adobe Acrobat Pro 10.1.13

    When using the text box( typewriter ) It appears black but when I click away it is a lighter grey. I am using Adobe Acrobat Pro 10.1.13
    . How do I fix this? It never used to do that.@

    Hi cj0094,
    Please try changing the registry key HKCU\Software\Adobe\Adobe Acrobat\10.0\Annots\cAnnots\cfreetext_003_afreetexttypewriter and change the opacity back to 1. This should reset the color to black.
    Note: Please backup the registry before modifying it.
    Regards,
    Rave

  • InDesign CC is performing poorly, slowly when working with text.

    InDesign CC is performing poorly, slowly when working with text. I tried updating and it seems like everything installed except for Extension Manager 6.0.7 which failed to instal. Any fix for this?

    Thanks, I think the problem is solved. Previously, the CC Extension Manager failed to install when I did an update via the InDesign Help menu. InDesign CC updated successfully, however, InDesign was still acting wonky. Since downloading a new full CC Extension Manager a little while ago, InDesign seems to be working better. Is there a correlation between the two apps for future reference?

  • [JS CS3] Frontmost document/selection when other with same name?

    I have a few scripts used to perform various operations on the current selection in InDesign. Under normal circumstances these work fine, but I can't seem to reliably get the frontmost document/selection when there is another document open with the same name. Most references to the document and every reference to the selection I have tried so far will simply lead to the document which was most recently opened (and has the same name).
    app.activeDocument.fullName always return the path to the most recently opened document of the same name, but app.documents[0].fullName will return the correct path. Trying to get the selection though will always return the selection of the most recently opened document of the same name, regardless of whether I try app.selection, app.activeDocument.selection or app.documents[0].selection. I have also tried with getElements()[0] appended to the document reference but it makes no difference.
    My primary environment is still CS3 and the problem appears to be that it only references documents by name. Brief testing with CS5 indicates this has been solved by Adobe, presumably because it now refers to documents using an id by default. Haven't tried CS4 but since its document object does not have an id property I'd assume it will behave the same as CS3. Is there any way around this, or is the best I can do to detect the issue (a simple app.activeDocument != app.documents[0] comparison seems to work reliably) and refuse to run if encountered?

    Welll...chances are the selected item will not be a valid ID in both documents of the same name. (I don't think ID's are globally unique, so that's not a guarantee -- but it's something you can check and only give an error if it happens to be that there is a collison).
    So, get the transaction specifier of the selection:
    app.activeWindow.selection[0].toSpecifier()
    Result: /document[@name="u1.indd"]//text-frame[@id=211]
    Then, iterate over app.documents to find the indexes of the documents with that name.
    In my test, of course it is just zero and one.
    Then, try to resolve the specifiers against those documents:
    resolve("/document[0]//text-frame[@id=211]")
    Result: [object TextFrame]
    resolve("/document[1]//text-frame[@id=211]")
    Error: Object is invalid
    Since only doc 0 has a textFrame with id 211, you know it's doc 0 and you have a valid specifier.
    I chose to adjust the specifier by hand, because I think that's probably the most general. The other choice would be to call app.documents[0].textFrames.itemByID(211), but then you would need to map "text-frame" to "textFrames" and that seems annoying and errorprone.

Maybe you are looking for

  • App-v 5.0 on terminal servers: move package root via powershell?

    Hi, I'd need to move the packageroot of app-v 5 packages of a terminal server to another drive. However, packages are in use, how can I do everything in one go making sure I can do this in one go? 1.stop or unpublish packages, I can unpublish but tha

  • External Hard Drive won't stop sleeping

    This is really frustrating me. I have my settings unchecked to allow hard disk to sleep, also my computer is set to never sleep. However whenever I try to access my external drive, I always have to wait several seconds for it to spin up. It's as if O

  • Checking the first radio box in a dataTable on initial load

    Hi, I have a datatable bound to a UIData object in a backing bean. The data table has a radio check box widget which I use to select a data row. I would like to have the first checkbox checked on an initial load, I tried using EL to no avail..... Any

  • Why can't I add a new contact from the phone app?

    I am trying to add a new contact from a call I got this am.  I get to the contact screen but I can add anything - ie no keyboard pops up to type anything in.  I also can not use the copy function to copy the number into the contacts app.  This is TER

  • Bc4j/oc4j/petstore problem

    After installing BC4J runtime on top of OC4J running on Win2k and Sun JDK1.3.1, bc4j demo is OK. the Sun's J2EE demo petstore stops working. Any idea? Thx. Request URI:/apps/petstore/template.jsp Exception: oracle.jsp.parse.JspParseException: Line #