Artem F Posted October 5, 2016 Share Posted October 5, 2016 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 Bauke and davemac2015 2 Quote Link to comment Share on other sites More sharing options...
Staff MEB Posted October 5, 2016 Staff Share Posted October 5, 2016 Hi fedorov, No, i don't think there's a way to do it. Regarding constraints, changes to objects like text (childs) inside containers cannot affect the containers (parents) dimensions. Quote A Guide to Learning Affinity Software | Affinity Quick Reference | Call for Camera Images Link to comment Share on other sites More sharing options...
Artem F Posted October 5, 2016 Author Share Posted October 5, 2016 I think it can be very useful. Please, move topic in feature requests Quote Link to comment Share on other sites More sharing options...
Staff MEB Posted October 5, 2016 Staff Share Posted October 5, 2016 Thread moved to Feature Requests section. davemac2015 1 Quote A Guide to Learning Affinity Software | Affinity Quick Reference | Call for Camera Images Link to comment Share on other sites More sharing options...
Bauke Posted October 5, 2016 Share Posted October 5, 2016 Hi Fedorov, I asked a similar question in this topic: https://forum.affinity.serif.com/index.php?/topic/22706-reverse-constraints/ and I'm still hoping one of the developers will give his opinion on this concept because I agree it would be very useful! Best, Bauke Quote Link to comment Share on other sites More sharing options...
drewbeck Posted October 12, 2016 Share Posted October 12, 2016 Yes! This would be ~ace~. I think constraints are a great way to do this, contrasted with Illustrator's method of layering effects on an object. Quote Link to comment Share on other sites More sharing options...
Staff Patrick Connor Posted October 12, 2016 Staff Share Posted October 12, 2016 drewbeck, Welcome to the Serif Affinity forums. :) Thanks for your input and support for this feature. Quote Patrick Connor Serif Europe Ltd Latest V2 releases on each platform Help make our apps better by joining our beta program! "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 More sharing options...
jallsebrook Posted May 9, 2017 Share Posted May 9, 2017 This is my only stumbling block - with better Constraint rules I can make to move to Affinity and persuade the rest of my team to move over too. Quote Link to comment Share on other sites More sharing options...
2046 Posted March 4, 2023 Share Posted March 4, 2023 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.