I was trying to get the following: create a linkbar with the width set to 100%, and 4 linkbutton On the left side, the 5th button should be placed on the right side. First of all, I was trying to install 2 linkbar controls in a link, however, it seems that the Flex application was corrupt and a blank screen was generated. Then I tried to put a MX: Spasar in the linkover property of the linkbar, but it does not work either, the spacer expands only about 1 character and did not push the 5th button on the right. Thank you, thank you.
You will need class monkey-patch for it. Linkbar is basically a horizontal box that automatically adds a spacer object to your children. See the UpdateDisplayList method - note that the size of the separator is set with this bit code:
if ( IsVertical ()) {... separator.setActualSize (separator width, verticalgap); ...} and {... separator.SetUtilities (horizontalgap, divider high); ...}
You have to change this behavior in some way. My recommendation is that it knows that this is the last spacer in the object (by comparing the loop iterator "I" in the total number of "I" in the hair list) and, if it is, its width is 100% or the same thing A clearly calculated version of
It seems that monkey-patching is the best option for implementing this change, because any attempt to change the size of spacers outside the actual square (in a derived class, for example) Probably will call this method and will be forced to reset the size.
For more information on how to see monkey patch in the classroom, or to update the flex cursor's functionality, it uses the monkey patch.
No comments:
Post a Comment