Rav Posted April 30, 2016 Posted April 30, 2016 Hello, I have a small problem with layouts and don't know how to resolve it. If you change the button's layout properties of the "Clientside Alignment - Layout VBox" example from (Flex=1 and Height='') to (Flex=0 and Height=30) so it doesn't change its height after form resizing and assign an image to it then both image and text are shown at the top of the button. With "Flex=1" they appear at the button's center as expected. Can it be corrected? Here is the example's screenshot: https://yadi.sk/i/O5vEz5lyrQRrB This is the example's code: https://yadi.sk/d/FDmav8_WrQR5r Quote
mhmda Posted May 2, 2016 Posted May 2, 2016 Hi, Will I think we should upload a video on youtube showing the correct use of the layout because it is very important for front-end design and there is no documentation on that. basically you should go through these steps to get the correct result: 1. set AligmentControl = uniAlignmentClient 2. set Parent (maybe form, panel...) 'layout' to 'vbox','hbox','fit'.... 3. A. keep in mind when using 'vbox' you should set the 'layoutconfing->width'='100%' and for height use flex or just use fix height. B. keep in mind when using 'hbox' you should set the 'layoutconfing->height'='100%' and for width use flex or just use fix width. 4. always draw your design using a paper or any graphic program to get an idea of how you will implement this inside unigui. good luck :-) Quote
Rav Posted May 3, 2016 Author Posted May 3, 2016 Hi, Will I think we should upload a video on youtube showing the correct use of the layout Yes that would be great! But first it would be nice just to get a text explanation of all layout properties. TUniServerModule properties description also would come in handy. Quote
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.