Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

defining a textbox with 'inline' elements

5 views
Skip to first unread message

gNeandr

unread,
Mar 22, 2012, 9:00:08 AM3/22/12
to
For a special search box I need two control elements which should be
displayed 'inline' in the textbox. Somewhat similar as it's with the
thunderbird/addressbook 'Search' -- the left dropdown menubutton to open
a selection menu and the right icon to clean the entry.

I tried to define an XLM file but it fails to open the dropdown menu.

Can anybody give a good reference which explains how to write the
"dropdown menu" with the menuitems etc ... or give a pointer to the
definition of the thunderbird/addressbook 'Search' to see how that's done?
Thanks in advance
Günter

gNeandr

unread,
Mar 22, 2012, 5:05:05 PM3/22/12
to
OK, found the problem is with using stringbundle/.properties in an .XML
file definition.

Example (partial of the XML definition):

> <content>
> <xul:stringbundle id="my-bundle" src="chrome://myext/local/myext.properties" />
> <xul:hbox class="quick-search-textbox textbox-input-box" flex="1">
> <xul:menupopup>
> <xul:menuitem label="Description" />

Replacing the label with an element of 'myext.properties' like:
"&label1" will not work.
What is the required defintion here?




Philip Chee

unread,
Mar 23, 2012, 12:18:07 AM3/23/12
to
On Thu, 22 Mar 2012 22:05:05 +0100, gNeandr wrote:
> On 22.03.2012 14:00, gNeandr wrote:
>> For a special search box I need two control elements which should be
>> displayed 'inline' in the textbox. Somewhat similar as it's with the
>> thunderbird/addressbook 'Search' -- the left dropdown menubutton to open
>> a selection menu and the right icon to clean the entry.
>>
>> I tried to define an XLM file but it fails to open the dropdown menu.

I think you meant a XBL file.

>> Can anybody give a good reference which explains how to write the
>> "dropdown menu" with the menuitems etc ... or give a pointer to the
>> definition of the thunderbird/addressbook 'Search' to see how that's done?
>> Thanks in advance
>> Günter
> OK, found the problem is with using stringbundle/.properties in an .XML
> file definition.

What made you think that this would work? It doesn't even work in plain XUL.

> Example (partial of the XML definition):
>
>> <content>
>> <xul:stringbundle id="my-bundle" src="chrome://myext/local/myext.properties" />
>> <xul:hbox class="quick-search-textbox textbox-input-box" flex="1">
>> <xul:menupopup>
>> <xul:menuitem label="Description" />
>
> Replacing the label with an element of 'myext.properties' like:
> "&label1" will not work.
> What is the required defintion here?

Any reason you didn't try the more obvious method of using a DTD file?
Or were you trying to see how difficult you could make an otherwise
simple task?

Phil

--
Philip Chee <phi...@aleytys.pc.my>, <phili...@gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.

gNeandr

unread,
Mar 23, 2012, 7:07:44 AM3/23/12
to
On 23.03.2012 05:18, Philip Chee wrote:
>
> Any reason you didn't try the more obvious method of using a DTD file?
>
;) Good point, Phil!
Sometimes the simple errors are the hardest to find.
You are right the definitions are stored in .dtd file.
Thanks for that.
Günter
0 new messages