PDA

View Full Version : Design mode doesn't look exactly the same as actual?


cpthk
09-17-2009, 10:05 AM
Hi:

I have been used flex for very long time. I realized there is a major issue that the design mode in flex builder doesn't look exactly the same as actual. I usually align many panels, datagrid...etc up and down. The design mode has a very good function to magnet controls together. The actual look sometimes are little higher/longer, then it many look bad or even covers the panel/datagrid under it a little bit. I know of course I could use VBox for flex align controls during runtime, but sometimes I just really need x, y positions. Is this a bug or just too difficult for flex to calculate the real height?

What's your solution?

wvxvw
09-17-2009, 02:19 PM
I think I had never opened the design view tab... (unless forced to by other people :) ) if you need a position, just assign the number to the corresponding property... that's it :|

Peter Cowling
09-17-2009, 03:35 PM
I gave the design view a go when I first started using Flex.

I decided that it was not worth using, because:


its a greedy little so-and-so;
as you say here, it is not always an accurate representation;
I never save time using it, because I like my code - even mxml - a certain way (properties in order make for easier reading etc.), and its not produced like that;
debugging creates a natural point in which to identify the need for layout changes most times, and the browser does (should!) give a literal rendition of the layout


I would not want to knock it, but at the same time, I would say move away from design view as soon as practicable.

cpthk
09-17-2009, 09:23 PM
but sometimes, if for example I need to place a panel below another panel, I do not know the height of the upper panel. I do not set the height for the upper panel, and I do not want to do that either. I just want it to expand itself to the size it needs. In this case, I do not know the height, then how do I give x, y for the lower panel?

wvxvw
09-17-2009, 10:24 PM
Give it percents or write a function to calculate the height depending on your layout... What you see in design mode is the result of the same action already made by another developer, who was basically doing the same thing that you do...