Jump to content
You must now use your email address to sign in [click for more info] ×

Dynamic Button


Recommended Posts

Is there way to realize dynamic button in Affinity Designer?
Dynamic Button is a button have a dynamic width (or height) depending on the text inside.

For example, I have a button with text "Example". Padding of button is 20px. If I change text inside button to "Example text", I want to save padding 20px. Is there way realize it using constraints or another features?

 

Demo: http://imgur.com/MBsmidI

Link to comment
Share on other sites

  • Staff

drewbeck,

 

Welcome to the Serif Affinity forums. :)

 

Thanks for your input and support for this feature.

Patrick Connor
Serif Europe Ltd

"There is nothing noble in being superior to your fellow man. True nobility lies in being superior to your previous self."  W. L. Sheldon

 

Link to comment
Share on other sites

  • 6 months later...
  • 5 years later...

After so many years and this is still not resolved?

this is what I come up with.. not perfect but quite useful for rudimentary buttons.

The hack uses text background color and constrained child as a mask, while an extra parent is used for the border as the immediate parent border is used for spacing.
There are two solutions I came up with, while only the hack on red button is kind of OK. Sure a dirty hack with lot of flaws .. like you cannot use gradients and so many features as if it would be done properly if such proper way would exists, meaning constrains between object no matter their child parent or what relation ships.. simple constrains as such. If you ever worked with CAD you would understand what real constrains means.

See the attached file

 

dynamic_button.afdesign

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.