Dynamic button text not centered
just created a dynamic button with rounded corners the text inside the button though is not centered its noticeable and i can't seem to change where the text sits in the button
just created a dynamic button with rounded corners the text inside the button though is not centered its noticeable and i can't seem to change where the text sits in the button
founded,
Whichever way you have seen it, you can do it in one of the following ways, in either/all cases keeping the live (editable) Type (maybe simpler/better/more errorproof); you can make fine adjustments by eye with the transform effect if needed (goes for any solution).
A: In an existing box:
1) Tick Use Preview Bounds in Edit>Preferences>General;
2) Select the live Type with the (normal) Selection Tool and Effect>Path>Outline Object.
That will give you a Bounding Box that fits tightly round the live Type, and will ensure centring (both directions) and keeps doing so when you edit.
But if you need it as non outlined text in PDF you will have to remove the effect:
3) With the live Type selected, in the Appearance palette click the Reduce to Basic Appearance button.
That will bring it back to normal plain Type.
Obviously, you will need to untick Use Preview Bounds for other purposes, but you can just tick that again when you need to edit (some of) the Type if needed to keep it in place; that may not be necessary because the changes will (mostly, and only if no letters exceed the hitherto vertical bounds) be in the horizontal direction.
B: In a custom made static or automatically adapting box:
1) With the normal Type Tool create the text as live Type; you may wish to choose Align Center in the Window>Paragraph palette (bundled with the Character palette where you set the font and size);
2) In the Window>Appearance palette flyout click Add New Fill, then drag that fill down below Characters in the main Appearance palette and click it to have it selected; it will be highlighted;
3) Set the desired background colour (white), you may use the Window>Color palette or something else;
4) Effect>Convert to Shape>Rectangle (or Rounded Rectangle), then either:
4a) Click Absolute and set a predetermined size, or:
4b) Click Relative and set the width and height to be added to the live Type; you may try different values in Preview to see how it works.
This will give you the text as live Type so you can edit it (you may add text, even more lines), and it will stay centred on the background. If you choose 4a), you must keep the text inside, adjusting the font size if needed; if you choose 4b), the background will adapt to the text.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.