bootstrap
unread,Mar 28, 2012, 3:32:43 PM3/28/12You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
My extension needs to create a small borderless window
that barely contains 4 tiny (16x16 pixel) buttons followed
by a single line of text (everything on one line). I've been
having trouble creating an appropriate window, and also
figuring out how to size the window so it barely contains
the contents.
I've tried all sorts of combinations of arguments in the
third argument of window.open() to try to eliminate the
titlebar, close-button, minimize-button, resize-grips, etc.
The window.open() call is seeing my options in the 3rd
argument okay, because the following options work:
"screenX=64, screenY=32, width=128, height=64"
I've tried adding all these other options too, but the
windows always have titlebar, close button, etc:
"titlebar=no, close=no, menubar=no, minimizable=no, resizeable=no,
scrollbars=no, toolbar=no, status=no"
None of the above seems to work, even though this
window.open() is executed in the extension, which
I keep reading is supposed to have priviledges to do
all these sorts of things. Oh, I've also tried adding
"tooltip=true" to the option argument and that does
not change anything either.
I do note that putting "popup=true" in the options
does create a borderless window. However, I have
a feeling this is "cheating" somehow, because the
function of the window is more like a "tooltip" than
a popup menu. If all else fails I suppose I can live
with the popup menu option, but I'd rather do things
the correct way, and this way seems like a trick.
What gives with those options not working for me?
The other question is... how do I size this window
to the contents I need it to display (like a tooltip)?
I'm fine if it sizes the window automatically, but if
that doesn't work, how can I figure out how big to
make the window to just contain those 4 small
image buttons and one line of text that I need?
Each time I display this window it will contain
different text, and therefore I must display the
window a different size each time. I suppose
I can create a new window each time, but if I
simply hide and redisplay this window I'll need
to resize it each time before I display it, and
need to know how big to resize it each time.
Is there some function that tells me how big
a line of HTML text will be? Is that something
I should do by putting it in a not-displayed window,
the find the client bounding box... or something?
I need something reliable so I don't end up
clipping off some of the text now and then
(either in the vertical or horizontal direction).