Change the font size of Textfield using buttons

Hello

I have some textfields in my form with a static confined area and the default font size is set to 11px. However, some users would like to have a possibility to increase the font size in these areas. I looked for a solution and I understand the there are 2 ways to do this: either by using a button to change the size of police (i.e.) with a drop-down list controls the size of the police. I am wanting to do something like this:

(1) add 2 buttons on the form to control the font size. Will be a button "+" (to increase the font size) and the other button will be "-" (to decrease the font size).

(2) I understand that if I am setting a size police fixed increase to, I can add a javascript something like this:

TextField1.font.size = "12pt"; 

But I don't want to like this because in this case, I can only give limited options. Is it possible to write a javascript script that can identify the font size of the object textfield then adds (or) subtracts 1 point to the font size depending on whether the user clicks on the '+' or '-' symbol? In this way, the user can control and experiment what best suites of font size them. Hope this makes sense... I wonder if anyone has an idea on how I can do this...

Hello

You can use code like this on the '+' and '-' buttons

This code is for the button «+»

get the font size

var currentSize = TextField1.font.size;

get the location of the string "pt".

var ptPlace = currentSize.indexOf ("pt");

get the part of the string that is just a number

var currentSizeInt = currentSize.substr (0, ptPlace);

analyze this new string as an integer and add 1

var newSizeInt = parseInt (currentSizeInt, 10) + 1;

set it as the new font size (adding the "pt" back on)

TextField1.font.size = currentSizeInt + "pt";

Obviously for the '-' you just change the line that adds the value 1 to subtract 1

Hope this helps

Malcolm

Tags: Adobe LiveCycle

Similar Questions

  • How to change the font size of statictext and button is the font size in the user interface?

    Hello

    How to change the font size of statictext and button is the font size in the user interface?

    Thks.

    Goldbridge

    var w = new Window ("dialog");
    var s = w.add ("statictext", undefined, " 30 Point Static");
    var s2 = w.add ("statictext", undefined, " 100 Point Static");
    // the third argument is the font size
    s.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 30);
    s2.graphics.font = ScriptUI.newFont ("Helvetica", "Bold", 100);
    
    w.show ();
    

    See the example above.

    See also Peter Karhels Guide to the user interface. Very recommended.

    http://www.kahrel.plus.com/InDesign/ScriptUI-1-9.PDF

  • change the font size textfield shot scene

    I have put a dynamic textfield on stage with a false text inside and he gave the my_textArea of the instance. Now I want to change the font size, so I used this code:

    var myTextFormat:TextFormat = new TextFormat();

    myTextFormat.size = 10;

    my_textArea.setTextFormat (myTextFormat);

    my_textArea.html = true;

    my_textArea.htmlText = 'This is a test';

    But it is not resize the text. There it turns into 'This is a test', but the font size is exactly the same, as it was originally (30).

    It works when I create the textfield via actionscript, but I also want to apply to a dynamic textfield, which I have already placed on stage.

    What I am doing wrong?

    the code that I have proposed works.  Simply replace your code with the code that I have proposed.  don't change anything.

    and once again, if you use the code in your message #2, you must embed two fonts (properly) and you will need to use setTextFormat with two instances of textformat or use a style sheet.

  • I use Adobe Muse CC browserediting.  How can I change the font size?  How can I delete a photo?

    I use Adobe Muse CC browserediting.

    How can I change the font size.  I copy and paste a paragraph MS lyrics Muse, but any font size, I chose, the paragraph will show that one size after that I stuck in Muse.

    I have tried both right and left clicks on, however no button change was shown on my photos.  How can I delete a photo.

    Thank you

    You can not do with editing in the browser, any changes affecting the structure or appearance of the page. You can replace only the content items.

    Mylenium

  • You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    You can change the font size using the form in the preview (not with the text box). Having also arrow drawing trouble in preview.

    What problems are you having with the arrow? You go to Tools-> annotate-> arrow and an arrow appears. Then you can drag around the head and tail to make it to the desired location.

  • I was using Firefox on a Web site, and all of a sudden, everything changed for these little characters that I can hardly read it. Any suggestions as to how I can change the font size? Ray Fowler

    When you use Firefox, the font size is automatically changed to so small I can hardly read it. How can I change the font size in Mozilla Firefox?

    Reset the page zoom on pages that cause problems: view > Zoom > reset (Ctrl + 0 (zero); Cmd + 0 on Mac)

  • I can't go in the settings of fonts. How to change the font size?

    I had downloaded the latest version of Firefox and I finished it sync for my Android phone. I went into a kind of dialog box settings and accidentally changed my fonts and text settings and now I can't read any of my Gmail which is in my account on my desktop - it's too small. I'm trying to figure out how I can enter in the content settings (I feel that I do once I have enter the menu 'options' on the content settings page, but I don't know how to bring up the menu of the content/page settings). I use my desktop PC for work and I can't use it with the font settings and how they are now. I also read where the issues are taken, but no one knows how to find the answers to the questions people are asking. How do we get the answers that people give us on the issue, we asked?

    I hope you can help me as soon as POSSIBLE, I can change what I as soon as POSSIBLE. I'm working on my pc 24/7 for the work and is not helping me when I can't read the emails and I can't solve the problem.

    Thank you!

    Hi Upset2,

    Sorry to hear that you are having problems with font sizes in Firefox on your desktop.

    Text sizes really small for each Web site you visit, or is it just your emails?
    Text sizes are really small on your desktop and Android or only one?

    There are several things that could cause your text sizes to seem strange, so I'll take you by a couple.

    First of all, your email page could have a zoom. On your PC, could you please try open Gmail and then by clicking on the icon at the top right of your screen that looks like three lines?

    This will bring up a new menu and near the top of the menu are three buttons: a minus (-), a percentage (that is to say, he could say 70%) and a plus (+). Please click button percentage - this should Gmail zoom to 100%.

    If that doesn't fix it, let's try using the method on your printout. To access the content settings screen, click the button in the top right that looks like three lines. Click on Preferences. A new window will open. Click on the 'Content' button and follow the instructions that you change the font size.

    There is another version of the instructions I just gave you, with screenshots, here: font size and zoom - increase the size of web pages

    Mozilla Support issues are all handled by volunteers, and at peak hours, there may be a delay. Thanks for your patience!

    I hope this helps.

    Jayelbe

  • A way to change the font, size and "BOLD" to each page?

    Due to problems described here https://support.mozilla.org/en-US/questions/1012057?esab=a & s = & r = 0 & as = s I erase that I need something (an extension, perhaps) I want to recognize and change the font size and "BOLD" fonts in each page.
    Is there something like this?
    Maybe also for the bookmarks bar...

    You can use the NoSquint extension to define the size of the font (zoom text/page) and the color of the text on web pages.

  • possible to change the font size of the bookmark toolsbar?

    possible to change the font size of the bookmark toolsbar?
    upgrade to firefox v22 and notice this bookmark toolsbar got bigger, some bookmark font cannot be displayed, it is normal? possible to change?

    Hello

    Firefox on Windows is now after display, scaling options that can make the biggest text on screens at high resolution.
    You can adjust the resolution of your screen.
    To change it follow these steps:

    • Type of topic: config in the Firefox address bar and hit the Enter key.
    • If the warning that this might void your warranty , click I'll be careful, I promised.
    • Search for layout.css.devPixelsPerPx

    • Double-click layout.css.devPixelsPerPx to edit its value. The default value is - 1.0 in Firefox 22 and above. Change it to 1.0 to run as in previous versions of Firefox.

    If necessary, further adjust the value of 0.1 or 0.05. Values between 1.0 and around 0.5 to reduce the size of the elements. Use a value greater than 1.0 to increase the size. For example, a value of 1.25 will increase the font size of the 125% to account for the default DPI setting in Windows 8. Check the value that you enter. Definition of a value that is too small will take everything away and too high will explode things.

    If the web pages should always be adjusted so you can watch the extension Default FullZoom Level or NoSquint .

    To adjust the font size for the user interface, you can use the extension of theme font & size changer .

    This solve your problems? Please report to us!

    Thank you.

  • How to change the font size and color in the toolbar Firefox 10?

    I was switched to Mozilla Firefox 10.0 by a representative of Dell. I had been using IE8. I have the Windows 7-64 bit operating system. I can't read my toolbar on Mozilla it is so small and the police is black with gray background! Is this not a great combination. Is anyway to change the font size of toolbar and from the colour? I downloaded the module Amazon on WOW! It's clear as a Bell, but Mozilla is absolutely horrible. If I can't get the editing toolbar I need to know another browser to use cause after only 5 hours trying to customize and use Firefox 10.0 I'm all done. I can't get any telephone communication or chatline support. I was in the knowledge base up until I can recite! And Kaspersky is not compatible. More of a nightmare what I need.

    Theme font & size changer: https://addons.mozilla.org/firefox/addon/theme-font-size-changer/

  • What happened to the bar that says 'file, edit' etc.? How can I change the font size to display Hotmail? Where can I access 'Cancel '? Thank you-

    How can I access the toolbar which includes "file, print" etc.? How can I change the font size of my hotmail home page? It used to be using "display".

    In Firefox 3.6 and later Windows, you can hide the menu bar on "view > toolbars" or via the contextual right click menu on a toolbar.
    Press F10 or press and hold the Alt key to bring up the menu bar temporarily.
    Go to "view > toolbars", right click on the menu bar, or press Alt + V T to select to show or hide toolbars (click on an entry to switch from the State).

    See also what happened to the file, edit and view menus? and http://kb.mozillazine.org/Toolbar_customization

  • Change the font size on HP5520

    Please tell me how to increase the size of the font on my Hp5520 A-I-O printer without affecting my office.

    My pages print in very small print.

    Thank you

    Mima,.

    Examples:

    ===========================================================================

    Firefox > file > print preview > >

    Two Options > >

    Scale

    OR

    Page Set Up > Format & Options - includes scale and shrink to fit Page Width option

    ============================================================================

    Internet Explorer > file > print preview >

    Shrink to Fit > > provides the overall percentage of the print size - could be preset to "fit to page".

    AND / OR

    Internet Explorer > file > Page Setup >

    Clear the check BOX Select the shrink to Fit > > Presets of the 100% print page

    ============================================================================

    Chrome > > this browser seems devoid of other browsers use controls

    • You may have difficulty the view before printing - check with other users of Chrome to check
    • You can change the font size used by Chrome, permanently if the problem is constant:
    • Customization bars > settings > advanced > Web content > font size

    =========================================================================

    Most browsers:

    To set a Web page view before printing:

    PC:

    Cntrl + more

    Cntrl - small

    Mac

    * Cmd + more

    Cmd - small

    * Command key

    -----------------------------------------------------------------------------------------------------------

    Reference:

    Manage the print with preview output before printing

    When you see a post that will help you,

    Who inspires you, gives a cool idea,

    Or you learn something new.

    Click the 'Thumbs Up' on this post.

    My answer-click accept as Solution to help others find answers.

  • 8.2 mail is possible to change the font size in the e-mail inbox list? It is necessary to do in Mail preferences, but nothing happens.

    8.2 mail is possible to change the font size in the e-mail inbox list? Otherwise why is there a place to do it in the Prefs of Mail. ?

    Using OS X Yosemite, version 10.10.5, iMac (21.5 inch, at the end of 2013)

    Intel Core i5 at 2.7 GHz

    8 GB 1600 MHz DDR3

    You try to change the font size in the sidebar (files)?

    Maybe this helps: settings > general > size of the sidebar icons.

    Maybe change the resolution of the screen could help?

    Good luck

  • change the font size in the macbook air

    How do you change the font size in a mac book air?

    I assume that you are looking to increase the size of all the text that you see in all applications - system-wide. In this case, please open System Preferences > accessibility. Check out the options at your disposal under Vision. You can "zoom in" the entire screen by using a combination of keys.

    Some applications (such as Safari) allow you to zoom in on the screen using a two finger trackpad gesture.

    Font sizes are changed to applications (such as Pages) by using a text editing menu selection, but there is no way equivalent to achieve in the Finder (for example) or other applications that are not intended to manipulate text.

  • How to change the font size to print documents?

    Original title:

    Printer prints very small fonts
    How can I change this font?
    It was working fine

    Hello

    Generally, we change the font size in the application with which we try to print.

    1. what application you use to print?

    2. what operating system is installed on the computer?

    You can view the following link to learn more about print options:

    Choose printing options

    http://Windows.Microsoft.com/en-us/Windows7/choosing-print-options

    Let us know if it helps!

Maybe you are looking for

  • Pavilion dm4-2191us: drivers required for the PCI, SM bus, PCI, Ethernet, two unknown devices communication device

    PCI device: PCI\VEN_10EC & DEV_5209 & SUBSYS_1650103C & REV_01 SM Bus controller: PCI\VEN_8086 & DEV_1C22 & SUBSYS_1650103C & REV_05 Simple PCI communications controller PCI\VEN_8086 & DEV_1C3A & SUBSYS_1650103C & REV_04 Ethernet controller: PCI\VEN_

  • HDD upgrade options for Satellite 2410-504

    Hello I am looking to upgrade the HARD drive on my 2410-504 but have found no information on what limitations there are on a HARD drive more large size. The thread by Sherlock for the upgrade of 2410-404 suggests a load up to 60 GB capacity, but the

  • Personal Cloud invites.

    Hello I finally got my problem sorted out personal weight bearing. Noah in the confuguration screen, we are all green ticks. The question I have now is I'm trying to invite a few people, but e-mails are sent... I sent one to myself that I have receiv

  • MSATA for HP G6 2240sh is possible?

    Hello! I have a HP G6 mobile 2240sh. I would like to add an ssd, but I don't want to let hdd. Can I add an msata ssd to my laptop? THX

  • HP Pavilion 15 laptop: update not downloaded from hp support assistant

    I have a laptop HP Pavilion 15 with the product J6L90PA #ACJ number. Today I just installed kaspersky anti virus and after I have could not download the updates from hp support assistant. The window indicates that its download, but there is no progre