How to determine the length of a line of text in a multi line text control

I am working on a simple widget to compare two snippets of text.  The string controls are side by side with a colum of square bools in between
the two string controls.
The Bools line up with the lines of text in each string control.  The Bools are used as a quick indicator that at that line point there is a difference
between the two string controls.
 There is a slider that allows the user to scroll up and down,  the slider scrolls both string controls simutaneously.
As the string controls are scrolled I will be comparing the left and right lines of text and reflecting the match status in the Bool Colum.
The reason I need to know the length of the line of text is so each line can be compared against one another.  It is not as simple as counting the
col width of the string control and parsing the text because if there is a line return the text will word wrap before before it extends all the way accross the string control, which will cause parsing discrepencies.
Any suggestions on obtaining the multi line string control text character length would be much appreciated.
Best Regards
Tim C. 
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!

Front panel of widget....
1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
Attachments:
One.vi ‏27 KB

Similar Messages

  • How to determine the length of a curved path in illustrator CS2

    how to determine the length of a curved path in illustrator CS2?

    bornfree,
    The free Patharea/Pathlength Filters from Telegraphics is your friend (the former gives you both area and length, both in different units):
    Telegraphics - Free plugins for Photoshop & Illustrator...and other software

  • How to determine the length of a LRAW field

    Hi
    I'm trying to write a generic persistency class that saves data in a table with a lraw field.
    As required the lraw field must be preceded by a length field of type INT2, but how can I calculate the actual length of the lraw field?
    kind regards Thomas

    Hi Martin
    I'm sorry to tell you that you are wrong. The INT2 field must contain the actual length.
    I have a table with a LRAW of 1024 bytes, but if I put 15 to the length field, then only 15 bytes are stored in the database.
    Of course I could just enter 1024 for the length, but that would wast a lot of database space - and performance.
    My class has a persistency method that inserts or updates a record in the database. The data that should be stored in the LRAW is sent to the method via a pointer (field symbol) of type X. This pointer can point at any data type.
    Something like this:
    field-symbols: <input> type x.
    field-symbols: <lraw> type x.
    *assign any field to <input>
    assign <lraw> to mydbtable-lraw_field casting.
    <lraw> = <input>.
    *here i need to determine the length of mydbtable-lraw_field before i store the content to the database.
    By debugging I can tell that if the pointer points to a char 32 field then the length of the X pointer is 64 and if the pointer points to a timestamp then the length of the x pointer is 8, but how can I determine this length programmatically - either from the x pointer or from the LRAW?
    Best regards
    Thomas

  • How to determine the length of variable based on the character contents

    Hi Experts,
    I need to determine the length of variable based on the character contents I am looking for.
    Example;
        lv = 'FENCE - Construction bond'
    Where I need to know the exact field length of 'FENCE -'.
    It's possible that variable will have different values in different lengths.
    Thanks.
    Kath

    Kathy Amion  ,
    hello Will you please elaborate ...!
    The suggestion for your proble as i understood it is you will have to split the string at seperator '-' in two say variable name and conten. and then  you will calculate the length of the VARIable name by using string function.

  • How do I determine the length of a column?

    Does anyone know how to determine the length of an Oracle column through sql statements? I know in SQL Server you can use the COL_LENGTH function to find the maximum length for a particular column, but I haven't been able to find an equivalent for Oracle.
    We have a column in a database that is a VARCHAR2 and can be any szie from 64 to 255 characters. I need to determine on the fly from a running client application what size the column is in the current database.
    Thank you very much for any help you can give me.

    select data_length from user_tab_columns
    where table_name='YOUR_TABLE' and column_name='YOUR_COLUMN';
    if you want function to return this value, create function like below..
    create or replace function col_len(t varchar2,c varchar2)
    return number is
    n number;
    begin
    select data_length into n from user_tab_columns
    where table_name=upper(t) and column_name=upper(c);
    return n;
    exception
    when others then
    return 0;
    end;
    /

  • Printing all text in a multi-line text field??  Can it be done?

    I was wondering if there is a way to print out a multi-line field and have all text entered print as well.  Currently, anytime someone enters more information in a multi-line text field on our form than is set to show without scrolling, when a PDF is created for printing from the results page, only the text that fits within the specified size prints.  You can scroll within the PDF and read it all, but I can't seem to figure out how to get all of the text to show and have that field resize accordingly on the printed copy.
    Is there a way?  Thanks.

    Is there an easy way to determine the character count that is visible in a given multi-line text field when designing the form, so if I want to allow 500 characters, the text box I create is large enough for 500 characters?  Obviously I can just do a trial and error process using a cut and paste of 500 characters and testing it, but is there an easier way?

  • How to determine the maximum allowable length of a filename for Window ?

    Hi all,
    Could I know how to determine the allowable file length (the length of the absolute path) for a file in Window environment?
    Due to some reason, I generated a zip file with a very long filename ( > 170) and put in a folder(the length of the folder path around 90). The length of the absolute path is around 260.
    I used FileOutputStream with the ZipOutputStream to write out the zip file. Everything is working fine while i generating the zip file.
    However, while i try to extract some files from the zip file i just created, i encountered the error
    java.util.zip.ZipException The filename is too long.
    I am using the class ZipFile to extract the files from the zip file like the following
    String absPath = "A very long filepath which exceed 260";
    ZipFile zipF = new ZipFile(absPath);  //<-- here is the root causeIs it possible to pre-determine the maximum allowable filepath length prior i generate the zip file ? This is weird since i got no error while i created the zip file, but have problem in extracting the zip file ......
    Thanks

    Assuming you could determine the max, what would you do about it? I'd say you should just assume it will be successful, but accommodate (handle) the possible exception gracefully. Either way you're going to have to handle it as an "exception", whether you "catch" an actual "Exception" object and deal with that, or manually deal with the length exceeding the max.

  • How to reduce the length of  lines in Smartform windows

    Hi,
           In  smartform  Mainwindow or any window,  how to draw the vertical lines and horizontal lines and how to reduce the lengths...very urgent please explain.
    Thanks and Regards,
    surya

    Hi Surya,
    You should use templates for this purpose.
    and if you are in table then you can not use templates. Here you should go for the line type.
    and in either case there will be pattern tab in the right side bottom.
    if double click on the teplate it will get display.
    click on the select pattern and select the required format and give the line width
    ex 15 TW
    I think this will help you

  • How to determine the number of rows of data in a datatable?

    I have a datatable that I fill from an SQL query.  I do not know exactly how many rows of data it will return (due to my selection criteria) but will be somewhere between 100 and 300 rows.  I send this data into a report but need to determine the length of the report (panel height data member) programatically based on how much data the query has returned.  So, I need a way to count how many rows are filled in the data table.
    I tried doing a nested "if" statement checking the value of each cell but when I tested the expression at 59 "if" statements (will need 300+) I got a parser error in lookout when I tried to accept the connection.  I also tried a type of loop by assigning cursor.2 either to its own value (circular) or to its own value plus one depending on the value of the cell at cursor.2.  It was close but overshot by one row or more (much more sometimes).
    Any clever ideas?  Perhaps I have just been looking at this problem too long.  Thanks, in advance, for your help.

    Since the datatable gets the data from the SQL query, you can also use the SQL statement to count the number of rows in the query result.  
    For example, in datatable you do "select localtime, trace1 from intdata where xxx". You can get the count by "select count(trace1) from intdata where xxx". Use the same condition in order to get the same number of rows.
    Maybe another SQLExec object is needed to do the count.
    Whenever the datatable executes the SQL, the SQLExec executes and return the count.
    Ryan Shi
    National Instruments

  • How to determine the contract header's valid period...

    1. How to determine the service contract header's start date, end date, when related muliple items with different start date and end date?
    i.e., what is the different between the header's valid period and item valid period?
    For example:
    Sold to A has 5 items, which has different contract line item start date and end date, e.g.,
    item 2: 2010.9-2011.9
    item 3: 2011.4-2012.4
    As for combined the all item bolonged to sold to A to one contract, so the item should have different contract start date and end date.
    However, how to determine the contract header's start date and end date?
    2. Another question is: When process service contract data migration from legance to CRM, how to design the above scenario logic?
    Thanks in advance,

    Sent again, to wait the answer....

  • How to determine the value of  -D__SUNPRO_CC?

    Could any body tell me how to determine the value of -D__SUNPRO_CC? Iam now using Sun Studio 9.
    Thanks in advance.

    The C++ Users Guide describes all the predefined macros set by the compiler.
    The __SUNPRO_CC macro is a 3-digit hex number. The first digit is the C++ compiler major version number, which is 5 for all releases from WorkShop 5 in 1998 through the current release, Sun Studio 10. The second digit is the minor version number, increasing by 1 for each release in the major release series. The 3rd digit is a place holder for the very rare (none since 1994) cases when we have a micro version number. It is zero in current releases.
    The current compiler release is C++ 5.7, so __SUNPRO_CC is set to 0x570.
    You can see the macro setting by running
    CC -dryrun -c foo.cc
    and look for the -D__SUNPRO_CC =0xNNN on the ccfe command line.

  • How to determine the policy, when it is applied?

    Hi!
    Perform Group Policy.
    When do I need to reboot when
    to logoff, and when the policy is executed after
    without further action?
    How to determine the policy, when it is applied?

    Hi,
    Group policy settings that affect computer settings section apply at reboot and refrresh every 90 min (default refresh interval for computers). Group policy settings that affect user settings section apply at user logon to the domain.
    You can use RSOP.MSC or command-line gpresult /? to find out what/which GPO settings have been applied to the computer/user belonging to a domain.
    More information can be found below:
    http://msdn.microsoft.com/en-us/library/aa373481(v=vs.85).aspx
    http://technet.microsoft.com/en-us/library/cc940895.aspx
    Hope this help.
    Regards,
    Calin

  • How can determine the duration of an audio file

    Hi,
    i'm making speech recognition project using java. i can capture sound by michrophone and playback it. the type of the sound is .wav.
    my question is how to determine the recording duration (for example: determine the duration for 0.25 second) because i must recorded syllable,the assumtion is needed less than 0.5 second to say a word. and then.. can this wav file be changed into... binary or integer ?
    thanks for your help

    FYI I'm newbie in Java,
    Yes, I want to limit the audio file lengths to a certain value. What should I do?
    I have read wav file using an AudioInputStream, for audio format I'm using sampleRate = 8000.0F and sampleSizeInBits = 8. My friend said if I used 8 bit for sampleSizeInBit (resolution in amplitude) the binary file should be -128 till 127 in range according to the bit. I try this code and the result is binary file which is zero, positive, and negative.
    the code
    try{
    audioInputStream.read(audioBytes);
    for (int i=0; i<audioBytes.length;i++){
    System.out.println(audioBytes);
    catch(IOException ioe){
    System.out.println("Error"+ioe);
    I'm not sure that the code is right, but it works. Should I change the audioBytes into integer before? I try this code but it doesn't work.
    int a = new int[audioBytes.length];
    for (int i=0;i<audioBytes.length;i++){
    a[i] = new Byte(audioBytes[i]).intValue();
    this binary file has been printed in console (I’m using texpad). So, how I can write that to file.txt? I'm using FileoutputStream but it doesn't work correctly. Here is the code
    FileOutputStream fos = new FileOutputStream(strFilePath);
    {audioInputStream.read(audioBytes);
    fos.write(audioBytes);
    catch (IOException ioe){
    System.out.println("Error"+ioe);
    When I open file .txt is read as character like this üüüüüüüüüüüüûüüüûüûûû ||||||| ||||||| ||||||||||||||||||||||||||||| &#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746;&#1746; (like using alt plus number)
    Edited by: anasfr on Mar 19, 2009 9:02 AM

  • How to determine column length semantics through ANSI Dynamic SQL ?

    I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL.
    I have a database with NLS_CHARACTERSET=AL32UTF8.
    In this database I have the following table:
    T1(C1 varchar2(10 char), C2 varchar2(40 byte))
    When I describe this table in SQL*Plus, I get:
    C1 VARCHAR2(10 CHAR)
    C2 VARCHAR2(40)
    In my Pro*C program (mode=ansi), I get the select statement on input, use PREPARE method to prepare it and then use the GET DESCRIPTOR method to obtain colum information for output:
    GET DESCRIPTOR 'output_descriptor' VALUE :col_num
    :name = NAME, :type = TYPE,
    :length = LENGTH, :octet_length = OCTET_LENGTH
    For both C1 and C2 I get the following:
    :type=12
    :length=40
    :octet_length=40
    So, even if I know that my database is AL32UTF8, there doesn't seem to be a way for me to determine whether char or byte length semantics were used in C1 and C2 column definitions.
    Does anybody know how I can obtain this information through ANSI Dynamic SQL?
    Note: the use of system views such as ALL_TAB_COLUMNS is not an option, since we wish to obtain this information even for columns in a complex select statements which may involve multiple tables.
    Note: I believe OCI provides the information that we need through OCI_ATTR_DATA_SIZE (which is in bytes) and OCI_ATTR_CHAR_SIZE (which is in chars). However, switching to OCI is something we would like to avoid at this point.

    Yes, I was wondering which forum would be the best for my question. I see similar questions in various forums, Call Interface, SQL and PL/SQL and Database - General. Unfortunately there is no Pro*C or Dynamic SQL forum which would be my first choice for posting this question.
    Anyway I now posted the same question (same subject) in the Call Interface forum, so hopefully I'll get some answers there.
    Thank you for the suggestion.

  • How to Find the length of Infosource?/

    Hi BW Guru's,
    How to Find the length of Infosource?
    Thanks
    Bhima Chandra Sekhar G

    Hi Bhima,
    You can look up the transfer structure (extract structure) in table ROOSOURCE in the active version of the DataSource and determine its size via SE11 (DDIC) -> Utilities -> Runtime object -> Table length.
    Hope it helps!
    Bye,
    ROberto

Maybe you are looking for

  • How do I reinstall the l latest Apple TV2 update?

    After doing the last software update on Friday, I can't connect to my router because it does not recognize the password. I have tried restarting the router and ATV and verified my PW. I think what happened is that it installed the update for the Neth

  • IOS 8 bugs and fails

    hello, I got the iPhone 6 Plus 128GB and plugget it to iTunes and restored from backup of my previous iphone 5s... the first 3 months it was okay bit when my iPhone started filling the bugs started to appear and one after one until they became a big

  • Upgrade Weblogic portal 10.3.2 to 10.3.4

    Hi Guys, I installed weblogic portal 10.3.2 and working last 8 months. I developed Client application on this version and put contents its working fine. i upgraded portal 10.3.2 to 10.3.4. its upgraded without errors. when i login to Portal administr

  • Why Mac's are not prone to viruses

    I have ALWAYS had a mac dating back to the old Macintosh II and dread whenever I HAVE TO use a windows. Many of my friends and employees are windows fans and I have found myself defending mac's when I do not know the facts. I would greatly appreciate

  • Series resistors for digital IO?

    Hello, I have PXI-6508 digital io cards in my PXI chassis. The max output current for the digital lines is about 4mA. I had a problem where I had a digital port I was using as outputs blow out, presumably because it was outputting too much current. I