[Project_owners] System Fonts
jmbrochu at yahoo.com
Mon Jun 15 19:27:47 PDT 2009
"em's" did the trick for setting the box sizes.
Regarding the scrollbox, there is no property to give you the width of
the box minus the scrollbars. My interface is a gantt chart view for
sunbird/lightning. It uses three scrollboxes to provide a "header" at
the top and left of the main scrollbox. The top header (with dates) is
sync'd to the horizontal scroll position of the main box, and the left
header (with event/task titles) is sync'd to the vertical scroll of the
main box. The effect is similar to using "freeze panes" in excel.
The "header" scrollboxes need a spacer element at the end of their
content that is the same width as the scrollbar in the main scrollbox in
order to keep all of the content aligned between the two boxes. So I
have to set the width (or height) of these spacers dynamically based on
the system scrollbar widths.
I think that if xul elements had a "ScreenWidth" and "ScreenHeight"
property giving the width/height currently visible onscreen (similar to
ScreenX and ScreenY), you could calculate this more easily.
2009-06-15 6:24 PM, Neil wrote:
> Joe Brochu wrote:
>> I am looking for an easy way to get system fonts and sizes for
>> explicitly setting box sizes within a stack to dynamically
>> accommodate various native OS's. Are there any shortcuts or global
>> variables available within the Mozilla framework to reference this
>> I could probably create a piece of dummy text with no formatting and
>> get numbers from there, but I'm hoping for something more elegant. I
>> also don't want to redraw everything 3 times!
> It's not clear what you're trying to do, but maybe you could add an
> extra layer to your stack (but with visibility: hidden; so that it
> doesn't paint) that includes your dummy text which will cause it to be
> the correct size.
>> I could also use something similar for getting scrollbar widths.
> Perhaps you could include a xul:scrollbar element in your document and
> measure that?
> Project_owners mailing list
> Project_owners at mozdev.org
More information about the Project_owners