How do you restrict new line in input field or delete last char. in as3?
Sorry, Noobie here!
I have a text input box. If the enter key is pressed, a new line begins; thus making the previous line invisible unless the backspace key is pressed.
So, if i type "1" into the input box, then hit eneter the number "1" becomes invisible, unless I hit back.
Now, I still need the enter key because i have an event listener that calls a function once it is pressed, but i still need that "1" to be visible.
So, I need one of either:
To be able to restrict the input text field from creating a new line (making max line allowed= 1)
or
To delete the last character entered in the input text if the enter key is pressed.
Both of these should have the same result, however I don't know how to do both.
If anyone can help, i'd be very grateful!
This worked! Thanks so much!
Similar Messages
-
How do you get a line with MULTIPLE fields to WRAP ?
How do you get a line with MULTIPLE fields to WRAP ?
Good afternoon everyone...
THE PROBLEM: Why doesn’t a line with multiple fields WRAP?
HYPOTHETICAL EXAMPLE/WHAT I”D LIKE TO SEE
If I have 2 fields on a line (this is now a hypothetical example and nothing to do with my actual report)….let’s call them field A and field B. And if field A has values of all ‘X’ and field B has values of all ‘Y’…then….the normal case would be (ignore dots – only for spacing):
A……………………… B
XXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYY
But what if A is too long? I would want to see B wrap onto the next line like this:
A……………………………………………………B
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX YYYYYY
YYYYYYYYYYYYY
And similarly….if B is extra long, can the line print as:
A………………………. B
XXXXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
I don’t want the case where B is long and I get:
A………………… …B…
XXXXXXXXXXXXXXXXX YYYYYYYYYYYYYYYYYYYYYY
………………………..YYYYYYYYYYYYYYYYYYYYY
I can see how you can wrap an individual field like that…but how can you WRAP a line of[b] fields within the frame so it wraps to the BEGINNING of the frame on next line?
My SPECIFIC CASE
I have a report that I have stripped down to a simple structure for the purposes of this explanation.
My DATA MODEL has the main QUERY (for plant family and species data). The columns of the query are divided into 2 groups. The 1st GROUP contains the family data. Below that is the rest of the species data in a 2nd GROUP.
Linking from the 2nd species group (above) is a new QUERY to extract REGION data based on the common key field. Under this 2nd query is another group with all the REGION columns.
The LAYOUT MODEL has a group frame (the main , base one)
On top of this is a repeating frame based on the 1st group (family data).
On top of this is another repeating frame for the 2nd group (species data).
On top of this is 2 Frames on the same line line. The 1st frame contains columns from the species group .
The 2nd frame on this line is a repeating frame. The PRINT DIRECTION for this frame is ACROSS/DOWN. It repeats details of the REGION where the species is found. These columns come from this group come from the REGION QUERY and GROUP.
All fields on the report line have variable horizontal elasticity.
The problem is that when there is too much data on the line, it does NOT WRAP to the 2nd line.. It TRUNCATES.
Can the line be made to WRAP????..
In my current report, 1 of 2 things is happening:
1) All fields print on the line until it hits the page boundary and then it just stops. Truncated!
2) All fields print on the current line, then Oracle Reports throws a new page to print the REMAINDER of the long, input line
But I would like a LONG line to continue printing onto the following line of the same page.
I have tried all combinations of the elasticity fields and the ‘ADVANCED LAYOUT’ properties.
I have been focussing my attention with this problem on the frames .
We are using REPORT BUILDER V 6.0.8.26.0
Thankyou to anyone who may offer assistance.
Tony Calabrese.Steve,
you gain 1 thing, but you lose something else!
This thing is SO frustrating!
Hey Steve! Good afternoon.
I've done as you suggested....I have a long text boilerplate item - the only 1 on the line...and it has all the column in it.
So it looks like:
&col1 &col2 &col3 &col4 &col5 etc etc etc
And the line expands nicely to each field's requirements.
And when it gets to the right page boundary...it WRAPS to the next line! Beautiful!!!
The only thing is that...when I had individual fields across the line I was able to create format triggers for those fields. And in doing so I was able to reduce the font and change the justification. I had to do that because some of the fields had to appear superscripted.
So I wanted something like (ignore the dots):
...................................ppppp
AAAA BBBB CCCCC DDDD EEEE FFFFFF
So the field of 'ppppp' appeared slightly higher on the line than the other fields...
I can't see how I can do this with a single TEXT field containing all the &COL values.
Have you ever come across anything like this?
Thankyou again,
Tony Calabrese 12/4/2007 -
How do you start new line in paragraph style?
New trial user and can't figure out why a seemingly simple operation doesn't work..
How do you start a new line in a paragraph block? When I hit the enter key, it just returns to the front of the same line, overwriting the same line over and over again.
1. Clicked Text tool.
2. Dragged out a paragraph block.
3. Started typing and noticed that when it reached the end of the paragraph block, it just wrapped to the beginning.
Frustrated so could use some help.…but also make sure that the No Break option in the dropdown menu (triangle at upper right corner) of the Character Panel is UNchecked:
-
How do you create new lines?
Hey everyone.
I want to separate two or more text labels with a new line, something like <br> in html.
How is that possible? Thanks in advance.Using a spacer is may be not the best solution to create a new line. The width of the spacer is fix and if your application is used on a device with differend display width, it can be that the second text is still on the same line and not on a new line.
I used item.setLayout(Item.LAYOUT_NEWLINE_BEFORE) to place the text in a new line like this:
StringItem text1 = new StringItem(null, "Text 1", Item.PLAIN);
form.append(text1);
StringItem text2 = new StringItem(null, "Text 2", Item.PLAIN);
text2.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
form.append(text2);
StringItem text3 = new StringItem(null, "Text 3", Item.PLAIN);
text3.setLayout(Item.LAYOUT_NEWLINE_BEFORE);
form.append(text3); -
How can we restrict the sub-screen input field for particluar country?
Hi all i am having infotype 21 maintained with custom fields for sub-screen 200.
Out of that custom fields(City , District) They restricted city field not to appear for australian employees.
and district is sucesfully appearing .
They have written logic in the sub-screen 200 in PBO.this is reflecting in alll sub-types of 21(alomst 20 subtypes)
module abc_output.
If T001P-MOLGA = 'australia'.
if screen name = 'city'.
screen-input = 'OFF'.
screen-invisible = 'ON'.
endif.
endif.
Now the requirement is that this logic should be modified such that this city should appear in 7 sub-type instead of district.
what should be written can any one guide please .
regards
sasHi we can do in this way.
If T001P-MOLGA = 'australia'
if p00021-subty ne '7'.
if screen name = 'city'.
screen-input = 'OFF'.
screen-invisible = 'ON'.
endif.
endif.
if p0021-subty = '7'.
if screen name = 'district'.
screen-input = 'OFF'.
endif.
endif.
Thanks and closing the thread
regards
sas -
Want to know how to check for new line character in text file
Hi All,
I`m trying to read data from text file. However I`m not sure whether the data is in 1st line or nth line. Now I`m trying to read the text from the readline. But if text is "" and not NULL then my code fails. So I want to know how to check for new line character and go to next line to find the data. Please help.
Thanks
static int readandwriteFile(Logger logger,String filepath){
BufferedWriter out = null;
BufferedReader in = null;
File fr = null;
int get_count = 0;
try {
if(new File(filepath).exists())
fr= new File(filepath);
System.out.println("FileName: "+fr);
if(fr != null){
in = new BufferedReader(new FileReader(fr));
String text = in.readLine();
if(text != null){
get_count = Integer.parseInt(text);
in.close();
else{
get_count = 0;
else{
out = new BufferedWriter(new FileWriter(filepath));
out.write("0");
out.close();
} //Reading of the row count file ended.
catch(Exception e) {
e.printStackTrace();
finally {
try{ if (in != null) {
in.close();
if (out != null) {
out.close();
catch(Exception e) {
e.printStackTrace();
return get_count;
}You are calling the readline() only once which means you are reading only the first line from the file...
Use a loop (Do-While preferably)
do{
//your code
}while(text == "") -
How to insert a new line in MC1H(maintaining formula)
How to insert a new line in MC1H(maintaining formula)
Can anybody help me with the stepsHi,
1.run transaction SCC4 -> press Ctrl+F4 or the button for change ->double click one the row for your client -> on the field Cross Client Object Changes select Changes to the Repository and cross-client Customizing allowed -> SAVE
2. run MC1H and now you will have access to insert new line in the table
Regards Vassko!
Edited by: Vasil Pavlov on Sep 16, 2008 9:51 AM -
How to restrict the length of input field
Hi,
How to restrict the length of input field. That is we should not be able to enter more thatn 10 charecters.
Regards,
H.V.SwathiHi swathi,
For this you have to create a simple data type. No need of writing a code.
Go to Dictionaries -> Local Dictionary -> Data Type - > Simple Type - > Right click and "Create Simple Type".
Here you should create a Simple type with String as built-in Type. Here you will also see the Length Constraints option.
Set the value of maximum length and minimum length. In your case set the value of maximum length to 10. At runtime this will not allow the user to enter more than 10 characters.
Now create an attribute and bind it to this newly created simple type. Bind the value of the input field with this particular attribute.
Regards
Manohar -
How do i read new line char in jtextarea.getText()?
guys, how do i read new line character in jTextArea.getText()? i'll appreciate ur help tnx..:))
Use a StringRead, then you can treat the text file a file.
-
How do you use new ipod nano with itunes 10.6.3?
How do you use new ipod nano with Itunes 10.6.3. I have MBP and it lists itunes 10.6.3 as most current version and won't let me install itunes 11
The seventh generation iPod nano requires at least iTunes 10.7 and Mac OS X 10.6.
(85225) -
How to add a new line in SMS(Line Break).
Hi All,
I need to send SMS from PL\SQL Procedure
The problem i have been facing is that the string being passed in as sms content is not parsing a newline character.
It shows all content in one line.
I need to break them in several lines.
Give me a direction how to add a new line in SMS.
Regards,
Raj.Hi,
Sure, Here it is
CREATE OR REPLACE PROCEDURE APPS.AUTO_SMS_RTV_REPORT
IS
sender VARCHAR2(1000);
recipient VARCHAR2(1000);
message VARCHAR2(4000);
sub VARCHAR2(1000) := 'HELLO';
dt1 varchar2(1000) := to_char(sysdate,'DD-MON-YY');
mailhost VARCHAR2(30) := '10.7.7.xxx';
mail_conn UTL_SMTP.CONNECTION;
v_crlf VARCHAR2(2) := CHR(13)||CHR(10);
CURSOR cur_Rejection_Records IS
SELECT DISTINCT
rt.VENDOR_SITE_ID ,
pvs.email_address VENDOR_MAIL_ID ,
pvs.PHONE vendor_contact_no ,
hre.EMAIL_ADDRESS Employee_mail_id ,
hre.FULL_NAME
FROM apps.rcv_transactions rt,
apps.po_vendors pv,
apps.po_vendor_sites_all pvs,
apps.mtl_transaction_reasons mtr,
apps.fnd_user fu,
apps.hr_employees hre
WHERE transaction_type = 'RETURN TO VENDOR'
--AND TRUNC(rt.transaction_date) = TRUNC(SYSDATE)
AND rt.vendor_id = pv.vendor_id
AND rt.vendor_site_id = pvs.vendor_site_id
AND rt.REASON_ID = mtr.REASON_ID(+)
AND fu.user_id = rt.last_updated_by
AND hre.EMPLOYEE_ID = fu.EMPLOYEE_ID
AND TRANSACTION_ID IN (
11902189,
11902253,
11902148)
BEGIN
FOR rec_Rejection_Records IN cur_Rejection_Records
LOOP
Begin
sender := '<[email protected]>';
recipient := rec_Rejection_Records.vendor_contact_no || '@aaaa.com';
mail_conn := utl_smtp.open_connection(mailhost, 8025);
utl_smtp.helo(mail_conn, mailhost);
utl_smtp.mail(mail_conn, sender);
utl_smtp.rcpt(mail_conn, recipient);
utl_smtp.DATA( mail_conn,
'Date: ' || TO_CHAR(SYSDATE, 'Dy, DD Mon YYYY hh24:mi:ss') || utl_tcp.crlf ||
'From: ' || sender || utl_tcp.crlf ||
'Subject: '|| sub || utl_tcp.crlf ||
'To: ' || recipient || utl_tcp.crlf ||
utl_tcp.crlf ||
'Dear Supplier,'||CHR(10)|| utl_tcp.crlf ||'\\\0x0A'|| -- HERE I NEED LINE BREAK
'Please.'|| utl_tcp.crlf
DBMS_OUTPUT.PUT_LINE('Yep !!! SMS Sent Sucessfully :) ');
utl_smtp.quit(mail_conn);
EXCEPTION
WHEN UTL_SMTP.PERMANENT_ERROR THEN
dbms_output.put_line('Error - ' || SQLCODE || ' - ' || SQLERRM);
WHEN OTHERS THEN
dbms_output.put_line('Error - ' || SQLCODE || ' - ' || SQLERRM);
END;
END LOOP;
END AUTO_SMS_RTV_REPORT;
/ -
How to create a new line in label in Xcode
How to create a new line in label. for example I have two buttons & one label. when i press first button, l want to change the label text to "Hello World". then when I press the second button, on the same label I need to display"Good Bye" on the next line in xcode 5?
I want to display the lablel like below:
Hello World
Good ByeI am using Xcode to develop an app for iOS.
I tried using multi-line label & belwo is my code.
- (IBAction)change:(UIButton *)sender {
self.Screen.text = @"\nHello World";
- (IBAction)newChange:(UIButton *)sender {
self.Screen.text = @"\nGood bye";
everytime when i pressed the button, it replacing the whold lable text instead of adding the second line. -
How can you change your line access selection? I have found where you can change your plan selection, but can you change the line access fee or is that a set amount?
DIVAB71,
Great question. The line access fees for the account are a set amount and can not be changed unless you are going from a basic to a smartphone or vice versa. If you are wondering about adding the month to month discount if you are out of contract Ann154 has provided great information on how to access and add the feature.
LindseyT_VZW
Follow us on Twitter @VZWSupport -
How do you create new maps in Mail on iPad?
How do you create new maps in Mail on iPad?
In the iPad-manual they mention you can put messages in other mailboxes or maps (to free up the Inbox).
But they don't mention how to create such maps.
In the app itself I can't find a way to do it.
thanks for all replies
KamielMaybe you are confused by the fact I used the word 'maps' instead of 'folders' (my natural Ianguage is Dutch).
For your question about the manual: on page 59 in the 'iPad 2 user guide' under 'organizing Email' they say you can move messages to a different mailbox or folder. -
How to Insert a new line in a clob
hi,
i want to create reports as multi-line clob data using PL/SQL procedures.
is there any standard way of inserting a new line when iam generating
this clob data based on the data i fetch from a different table.
i short my question is "How to insert a new line in a clob?"
i tried using the character '\n', but that was of no use.
thanks in advance
rameshYou could always do a:
newLine := '
Since PL/SQL allows a tring to span multiple lines.
Maybe you are looking for
-
Icloud document sync issue between ipad and mac
So was very excited when mountain lion could sync my spreadsheets (numbers) documents with my iPad, but having a weird issue (I think). So I took one of my spreadsheets from my Mac, and moved to iCloud. Opened it up in Numbers (Mac), made a few chang
-
Address book in piserverdb tree
Hello if my knowledge is correct, the address book is stored in the o=piservdb tree in the Directory server. but how is that data stored? because when I export an ldif of o=piservdb tree and i look for a certain user which i know has nearly 2000 cont
-
I am supporting content management services. Few of my users want to get a report of who viewed (read) their files via CMS. Is there a way to get this report? I understand there is a log file which records all this. Is any one aware of this log file
-
hey everyone, I'm working on a game that involves making a "map" (a frame with a bunch of images, organized into a grid) if I am using paint() and code similar to this: (pretend width and imageW are already defined) for (int x = 0; x < width; x += im
-
VPN turns off when the phone is locked
when im on my iphone the vpn stays on but as soon as i lock it it turns vpn off