Limit number of chars per line
Hi ,
how to limit the number of chars per Line in a textArea or RTFEditableText?
I have to do the following:
Allow 25 Chars for first line,
any other line should have max. 28 chars.
First line should have a bold font.
Not an easy thing..
I tried to use a textarea fpr input and put the text into a datagrid in the textarea.change() event.
This works, but I lose a lot of the standard features of the textarea (hyphenation etc.)
The idea is to use only the textarea or a RTFEditor for applying the rules mentioned above.
Thanks
thorsten
extend PlainDocument class to restrict the number of characters per line.
Set this class as model to TextArea.
Below is a class which does this. May be its useful
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
public class FixedNumericDocument extends PlainDocument {
private int maxLength = 9999;
private String max="";
public FixedNumericDocument(int maxLength) {
super();
this.maxLength = maxLength;
//this is where we'll control all input to our document.
//If the text that is being entered passes our criteria, then we'll just call
//super.insertString(...)
public void insertString(int offset, String str, AttributeSet attr)
throws BadLocationException {
if (getLength() + str.length() > maxLength) {
return;
else {
try {
//check if str is numeric only
int value = Integer.parseInt(str);
//if we get here then str contains only numbers
//chk if it is less than 65535 so that it can be inserted
super.insertString(offset, str, attr);
catch(NumberFormatException exp) {
return;
return;
Similar Messages
-
How do I limit the number of measures per line in Logic Pro score editor
I would like to control the number of measures per line in Logic Pro X Score Editor, currently it puts random numbers of measures per line depending on the accumulated lenth of the measures per line, as if looking for "the best fit". Any ideas how to force four measures per line in my finished score?
Thanks, This solved my problem, the only thing I still needed to do was to find out how to open the Global format window. I fugured it out by opening the Score editor window / Layout / global format /then I saw the Max # of barlines. If you just go to the Logic Pro / Preferences then you never get to see the global format window unless you know to hit the "Score Project Settings" button on the bottom. But at least you showed me that there was such a option which limited the number of measures so I keep on trying until I fould how to reveal that option. Thanks !
-
How to limit number of logins per day?
We have a custom web application (WebAS 6.20) used by people and automated systems. Each user has his own login, and some of these automated systems sometimes produce heavy load because they log into system too often.
Is there an easy way to:
1) limit number of logins to, say, 1000 per day and when this limit is reached - do not allow this user to login till midnight
OR
2) dedicate one of the processes to the specific user
thanks in advanceextend PlainDocument class to restrict the number of characters per line.
Set this class as model to TextArea.
Below is a class which does this. May be its useful
import javax.swing.*;
import javax.swing.text.*;
import java.awt.*;
public class FixedNumericDocument extends PlainDocument {
private int maxLength = 9999;
private String max="";
public FixedNumericDocument(int maxLength) {
super();
this.maxLength = maxLength;
//this is where we'll control all input to our document.
//If the text that is being entered passes our criteria, then we'll just call
//super.insertString(...)
public void insertString(int offset, String str, AttributeSet attr)
throws BadLocationException {
if (getLength() + str.length() > maxLength) {
return;
else {
try {
//check if str is numeric only
int value = Integer.parseInt(str);
//if we get here then str contains only numbers
//chk if it is less than 65535 so that it can be inserted
super.insertString(offset, str, attr);
catch(NumberFormatException exp) {
return;
return; -
In the new iOS-7 Safari, has the "reader" function been changed to eliminate the option to modify font size (and hence to modify the number of words per line), or is it just that I can't find how to do that?
iOS 7
Seperate text size modification is no longer available in Safari Reafer.
Use Settings.
Settings >General > Text Size -
Send an attachment in email with length more than 255 char per line
Hi All,
I have to send an attachment in email with length more than 255 char per line. I dont want to break the line after 255 char and add it in another line.
Please suggest me any function module which can perform this.
Thank you all.I looked at all threads in the forum, there was about 5 or 6 identical questions, but surprise, nobody knows! It seems that SO_NEW_DOCUMENT_ATT_SEND_API1 function module does not allow more than 255 characters by line.
It would surprise me a lot if there is no workaround !
As it is very easy to add any binary attachment which is like a very long line, PDF for example (several kilobytes), via the function module above (lots of examples in the forum), I would advise you to try to use the same way, i.e. use the contents_bin parameter instead of the contents_txt parameter (convert the text into binary) and add the line feeds yourself (okay I know, it's not very smart).
Last thing, this function module is deprecated, and we should use BCS classes, maybe they work better. -
Is there a way to have a continious flowing text box with a limit of 26 characters per line?
I am trying to make an interactive pdf form or an indesign form for a classified section in a newspaper. We use a 26 character limit per line for pricing reasons. What I need is for a text box or field to flow continuously yet limit each line to 26 characters. Right now we have an interactive pdf form that has numerous lines that limit 26 characters per line but they do not flow so you would have to tab or cut a word short in order to go to the next line, the other problem with this is you can't copy and paste a full classified ad since it cuts it off at 26 characters. Any input on how I can achieve the the above question would be greatly appreciated.
There is a way in Acrobat to have text flow from one form field to another form field while entering the text. You can set your character limit per form field, and have as many fields as needed. But you cannot copy text and paste into the form field and have text flow throughout.
Here is a link that describes how to set the properties within Acrobat. -
List-processing: limitations to 255 chars per line?
Hi,
check the sample code below and if possible, execute it in some of your systems:
start-of-code
REPORT ZISM_TEST52 LINE-SIZE 300.
DATA:
line(300) TYPE c.
WRITE '0123456789' TO line+250(10).
WRITE: / 'From variable', /.
WRITE line.
WRITE: / 'Directly to the list', /.
WRITE AT 251 '0123456789'.
end-of-code
As you can see from the execution, when writing something into the char variable (in this case line), and try to put it into your screen, there is a limitation - only the first 255 characters of the variable take place in the resulted list. But, if you write directly into the list, this limitation is missing.
My question is closely related to this limitation:
Is there a possibility to avoid this limitation while putting something into the variable, and after that writing it to the list?
Situation is: I have quite complex report to rewrite (with several lists, and complex header texts for each list), which uses this technique - write to internal table, after that loop at the table and use simple write statement. I would like to save my effort and time and to use a a possibility to write variables longer than 255 chars to the list - if there is any.
So? Is there such a possibility?
Any help would be highly appreciated.
Many thanks in advance.
Regards,
Ivaylo MutafchievHI Ivaylo
Below is from documenation:
Creates a report with col columns per line.
If the LINE-SIZE specification is missing, the line length corresponds to the current screen width. The system field SY-LINSZ contains the current line size for generating lists. The maximum width of a list is 1023 characters. You should keep lists to the minimum possible size to improve useability and performance (recommendation: LINE-SIZE < 132). For very wide lists (LINE-SIZE > 255), you should consult the notes for using LINE-SIZE
greater than 255.
Notes
The specified LINE-SIZE must not appear in quotation marks.
If the you want the report list (i.e. the output) to be printable, do not define a LINE-SIZE with a value greater than 132 because most printers cannot handle wider lists. <b>You cannot print lists wider than 255 characters at all using the standard print functions.</b> To print the contents of the lists, you need to write a special print routine that arranges the data in shorter lines (for example, using the PRINT ON addition in the NEW-PAGE statement.
At the beginning of a new list level, you can set a fixed line width for the level using the ... LINE SIZE addition to the NEW-PAGE statement.
Maybe the highlighted portion might be one reason for this behaviour.
Kind Regards
Eswar -
F110 - How to limit number of payments per document
Dear All,
Our client wants to limit the number of payments per account document for Russia.
Does somebody knows a method to limit to "3" this number for each payment document when execution of transaction F110 ?
So if a supplier has 10 invoices payable, this creates 4 payments (3 + 3 + 3 + 1)
Thanks in advance
Regards
Daniel.Hello,
I do not think this requirement is possible in standard SAP.
You have to decide whether you want to group payment document for single invoice or all invoices.
There is no configuration to divide payment documents for 3 invoices.
Regards,
Ravi -
Smart playlist limit number of songs per artist
Is there a way to limit the number of songs per artist that show up in a Smart Playlist?
No.
You can check out dougscripts.com to find something to do what you want. -
How to limit number of chars in a CFGRIDCOLUMN
Hi,
I have a 2 column grid populated from a query. The grid is
editable and will be submitted to an action page for database
Delete, Insert, or Update. The first grid column corresponds to a
MS SQL database column that is defined as varchar(3).
Currently, if the user inputs 4 characters and submits, I get
a SQL trunc error.
There has to be a way to limit the number of characters in
this cfgridcolumn to 3? How is it done?Well, you could check the number of characters on your action
page, and bounce them back if it exceeds the maximum number, and
you can "protect" the database by including a limiting function on
the data in the insert statement, like LEFT(col, 3) so that
regardless what they specify, you will only insert the first 3 into
the database. You really should let them know if they entered too
many, however.
Phil -
Limit number of records per page in RDF report
Hi Alll,
My rdf report query return 200 records but while prinitng on the paper i should restrict 60 records perpage... please help me on how should i do it...
Thanks in advanceThough the maximum records per page while prinitng it is printing continously on the paper...
-
Limit the number of session per user in the Wired dot1x environment with ISE 1.2
Hello,
I need to check if there is any configuration/workaround to limit the number of sessions/access per user in the Wired dot1x configuration.
I need to check if this feature is available or not to solve the following scenario:
I have 2 SW ports configured to use dot1x authentication with ISE 1.2 server.
If user A connects to the 1st port and authenticated then he will placed on a VLAN based on the authorization profile.
The case, that I need to deny the same user to connect on a different machine with the same credentials.
The ISE itself does not have this feature currently, the only feature available is to limit the number of sessions for the guest user.
Is there any workaround on the Cisco switches to solve this? Cisco WLC has this feature and for the VPN we can limit the number of sessions also from the ASA itself.
Thanks.limit number of session per user using wired dot1x is not available in 1.3
-
LE7:Score Layout:Global Format:Maximum Bars per Line - Line Break Bug!
Hello
This problem occurs in Logic Express version 7.
(I am using MacOS version 10.4.2 on an eMac)
I am currently compiling and editing a large score for a big band composition consisting of 22 parts:
Flute 1
Flute 2
Clarinet 1
Clarinet 2
Alto Sax 1
Alto Sax 2
Tenor Sax 1
Tenor Sax 2
Baritone Sax
Trombone 1
Trombone 2
Trombone 3
Trombone 4
Trumpet 1
Trumpet 2
Trumpet 3
Trumpet 4
Guitar
Keyboard
Electric Bass
Percussion 1 (Kit)
Percussion 2 (Aux)
I am creating the score in a separate file, and I am combining parts into 1 stave each by instrument like this:
Flute 1 & 2
Clarinet 1 & 2
Alto Sax 1 & 2
Tenor Sax 1 & 2
Baritone Sax
Trombone 1 - 4
Trumpet 1 - 4
Guitar
Keyboard (2 staves)
Bass
Percussion
Each instrument, with the exception of keyboard which has 2 staves, consists of one stave, making up systems of twelve staves each. By sizing down each score style to 2,
I have managed to fit 2 systems onto each page, therefore significantly reducing the amount of paper needed.
The problem comes when organising the layout of my score,
in particular, the line breaks. Using layout:global format, I have limited the maximum number of bars per line to 8, both in the page edit and normal score mode.
I am trying to divide up my score so that there are 8 bars per system. Using the white arrow tool, I am dragging bars up and down in order to achieve this.
However, when I get 30 odd bars in, I discover a system with 12 bars crammed into it - and even printing it off, it is clear that the system could benefit with less bars; the notation is squashed up together and not very easy to read.
THIS IS THE ACTUAL PROBLEM:
So I tried using the white arrow to move the last 4 bars down onto the next system, and a bug occurs where I end up with about 20 bars on the system, oddly distorted, the first few bars of which are squashed up together at the beginning of the line, and the last bar of which is stretched far off the right hand side of the page out of view. Then the next 20 or so bars are no where to be seen (probably far off the right hand side of the page) before the system below.
If you dont know what I am talking about, I could provide a screenshot if you request.
I have tried everything to get 8 bars on that particular system; dragging the stretched bar downwards, dragging squashed bars downward, moving bars down 1 by 1, moving bars onto the system above, moving bars away from the system below (to make room for the 4 bars that I want to move from above), adding more bars and dragging them down, but none of these methods have worked. I am either stuck with 12 bars crammed onto one system and 4 bars on the next or an oddly distorted version of the system which cannot possibly be read. Even when I settle with the unsatistactory former, I encounter further problems on subsequent systems below, some systems of which are already distorted.
All I want is to have 8 bars per system, it should not be too much to ask! The layout:global format:maximum-bars-per-line calculation seems to be redundant, even when I reset the default line breaks - it just does not automatically set 8 bars per line, which it should do. Is there not an option to determine bars individually by number onto their respective lines, without having to use the white arrow graphic layout tool?
The problem is extremely frustrating, and it is preventing me from completing, presenting and handing in a score for my university music composition.
I have no other score producing software, and starting it
from scratch on paper is going to take me weeks, because it consists of 830 12/8 bars in 22 parts, and I need to get it ready by next term!
Any help would be extremely helpful and much appreciated, especially a patch or a useful way round. It could be related to memory, or hard drive space, as I have experienced similar problems in the past, where my score has been stretched off the page during a time when I have had little disk space...and this is a very large piece of music which might stretch the score capabilities of Logic.
If so, has anyone got any suggestions?
Thanks!
Rory
eMac Mac OS X (10.4.2)
eMac Mac OS X (10.4.2)nope just cutting should work.
here are some things to try:
1. try assigning a different score style. for the regions. duplicate and then adjust the default ones if necessary.
2. try creating a new instrument set. in fact delete them and make a new one (use the key command: create instrument set from selected)
3. it may be a formatting problem so check:
in global layout constant spacing (try 8 or 9) and proportional spacing (try 45 or so). then try factory defaults.
4. try copying and pasting the midi into a brand new region and looking at the score for that.
5. try fiddling with the layout tool drqagging bars up or down.
normally simply cutting the region of just one object is enough to force a redraw. maybe try it on all of the regions. what happens when you double click on a region? -
Limit the number of records per page in webi
Hello All,
How do i limit the number of records per page in webi?
i was asked to have not more than 20 records per page.
In " NUmber of Vertical records per page"(Quick display mode) the default value was 100, i am trying to set it to 20 ...but its not updating....its still taking 100.
I am on BO XI 3.1 Sp2 fix pack 3
Please let me know a way to accomplish this.Any inputs appreciated
ThanksIt can be done as follows:
1. create a variable at report level as:
v Test = Floor(RowIndex()/20)
2. Added this variable in the Block as a new column.
3. Select the v Test column, Right Click and set as section (also you can apply break).
4. Go to structure mode select section\break and go to properties tab and select the property "Start on new page".
Regards,
Rohit -
How do I Limit the number of Clients Per AP, Per Radio
I'm have WCS, 2 - WLC4404, 1 - WLC4402 and 1 WISM (6509). All running 7.X OS.
Here is my problem I have 4 3502 AP,s in the hall, but the laptops all connect to one AP. 2 Clients on A and 26 Clients on G.
How do I control this?
MikeIf you want to limit the number of clients PER AP then this is a feature that has been identified and will be available in the next few version.
You can, however, limit the number of clients and default is set to 12.
Maybe you are looking for
-
How do I create a new apple store account when my phone tells me that I have exceeded the maximum limit on this phone
-
Output report format rtf in IE5
Hello. I want to run a report and have the output in RTF format. This works fine, but when Internet Explorer ask me where to save the file the filename is rwcgi60, not myrep.rtf from the parameter desname=myrep.rtf. I have version 6i.
-
RFC- XI- WebService / Trouble with Inbound of RFC
Hi folks! i am in troubles! i have an rfc: CALL FUNCTION 'ZFI_AUSGLEICHMELDUNG_KISS' IN BACKGROUND TASK DESTINATION 'XD7_SEND_AUSGL_KISS' EXPORTING i_augkiss = wk_augkiss. the structure of wk_augikiss: EZDAT DATUM DAT
-
Hello im using weblogic 10.3.5 and jpa 2, but i cant make that my project works coz i have this issue.... 56177847, local class serialVersionUID = -8219935847209476671 java.io.InvalidClassException: org.eclipse.persistence.internal.helper.DatabaseTab
-
Error message when trying to write DVD
I have been trying to write a file to DVD on my iMac and first the DVD was written, but then the drive said it could not read it. That happened 3x with new discs. Then when I tried to do it again with a new disc a 5th time I received this message: Th