Alex,

I think you may be on to something.  I started messing around with the 
resolution on my laptop and noticed that the labels and such look perfectly 
fine if I'm running 1024x768 or even 1280x768.  However, the labels started to 
fall apart again as soon as I reset my resolution back to 1600x900.  Little 
strange but makes me wonder if the metrics are getting out of whack with higher 
resolutions.

--Anne

On Fri, 6 Feb 2009 11:15:29 -0800, Alex Harui <[email protected]> wrote:
> fontContext should only matter for embeddedfonts.
> 
> Compare the working example with the failed example closely.  You only
> have to be off by a pixel to cause truncation.  If the layout rules of the
> containers around the module cause it to be a different size that could be
> a problem.
> 
> Also note that any existing classes and styles in the mainapp supercede
> classes and styles in a module and could cause the widget in the module to
> think it has different metrics than you intended.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: [email protected] [mailto:[email protected]] On
> Behalf Of goddess12206942
> Sent: Thursday, February 05, 2009 9:53 PM
> To: [email protected]
> Subject: [flexcoders] Flex Truncating Button Labels
> 
> 
> I posted this on StackOverflow.com but thought I'd see if you guys
> might have any ideas as well:
> 
> First and foremost, I apologize for any vagueness in this question. At
> this point, I'm simply trying to get some new ideas of things to try
> in order to diagnose this bug.
> 
> Anyway, the problem I'm having is with an application that's using a
> custom moduleloader. That moduleloader has been compiled into an swc
> and the moduleloader is being instantiated via its namespace. This all
> works perfectly fine. The problem I'm encountering is specific to
> mx:button controls used within modules. For whatever reason, their
> labels are being truncated so, for example, Sign In is showing up as
> Sign ...
> 
> After quite a bit of fooling around I have been able to establish the
> following:
> 
> 1. This problem only seems to occur within modules. If a button
> control is used in the main mxml, the label does not get truncated.
> 2. The button control whose label is being truncated does not have
> a width specified (setting its width to 100% or a specific pixel width
> doesn't fix the issue)
> 3. The button control is using the default padding (messing with
> the padding by setting left and right to 5 or any other value doesn't
> help matters either).
> 4. We are not using any embedded fonts so I've ruled that out as a
> possibility as well.
> 5. mx:CheckBox and mx:LinkButton are equally impacted by this
> problem although mx:CheckBox also seems to not want to show its
> checkbox, it just shows the truncated label.
> 
> A potential side affect of this is that attaching a dataprovider to
> mx:ComboBox causes the combobox control to throw a drawing error but
> I'm not entirely certain that it's related to the above problem.
> 
> One interesting thing I did find while perusing the net for an answer
> was a mention of fontContext and its relationship to
> IFlexModuleFactory. There's no specification for fontContext within
> our implementation of moduleloader so I'm not entirely certain if this
> could be the issue. In any case, if anyone has any ideas, it would be
> hugely appreciated. On the other hand, if you know exactly what ails
> me and can provide me with an answer, I might just wet myself with
> excitement. It's late. I'm tired. I NEED my Flex app to play nice.
> 
> Thanks in advance,
> 
> --Anne
> 
> Edit: To clarify what I'm looking for with this question, I really
> just need to know the following:
> 
> 1. Could this issue be caused by a namespace conflict?
> 2. What else can potentially override the default behavior of
> labels if no CSS has been implemented?
> 3. Has anyone encountered a problem with inheritance being lost
> while using a custom implementation of moduleloader?
> 4. Has anyone encountered this problem or a similar problem with or
> without using moduleloader?
> 
> I'm not sharing any code with this question simply because I'd have to
> share the entire application and, unfortunately, I can't do that.
> Again, I'm not looking for the end all, be all solution, just some
> suggestions of things to look out for if anyone has any ideas.
> 
> 
> 

Reply via email to