代码之家  ›  专栏  ›  技术社区  ›  Minyi Han

如何在xul文件中设置复选框标签宽度?

xul
  •  0
  • Minyi Han  · 技术社区  · 3 年前

    我正在开发一个zotero插件,并想绘制一个对话框。的宽度 dialog , groupbox , hbox , checkbox 等等已经尝试过, minwidth , maxwidth 也尝试过,但没有效果。我想在标签的适当位置换行。

    非常感谢!

    代码:

    <?xml version="1.0"?>
    <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
    <?xml-stylesheet href="chrome://zotero-platform/content/preferences.css"?>
    
    <!DOCTYPE window SYSTEM "chrome://zoteroupdateifs/locale/options.dtd">
    
    <!--给作者加粗加星-->
    
    <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:html="http://www.w3.org/1999/xhtml"
        id="updateifs-test"
        title="&author-process-win;"
        width="200"
        height="300"
        style="padding: 10px;"
        buttons="accept,cancel"
        ondialogaccept=" window.close();"
        ondialogcancel="window.close();">
       
        <stringbundleset id="stringbundleset">
                <stringbundle id="updateifs-options" src="chrome://zotero-updateifs/locale/options.properties"/>
          </stringbundleset>
             
                <groupbox  width="200">
                  <caption label="&update-abbr;"/>
                  <separator class='thin'/> 
                  <description style="width: 220px">&update-journal-abbr;</description>
                  <separator class='thin'/> 
                  <hbox style="margin: 0" width="200">
                    <checkbox id="id-updateifs-add-update" label="&add-update;" />
                  </hbox>
                  <separator class='thin'/> 
                  <hbox style="margin: 0" maxwidth="200">
                    <checkbox id="id-updateifs-en-abbr" minwidth ='200' label="&en_abbr;"/>
                  </hbox>
                  <separator class='thin'/> 
                  <hbox style="margin: 0" maxwidth="200">
                    <checkbox id="id-updateifs-ch-abbr" minwidth ='200' label="&ch_abbr;" />
                  </hbox>
                </groupbox>
            
      <script src="options.js"/>
      
      <script
        type="application/x-javascript"
        src="chrome://zoteroupdateifs/content/scripts/options.js"/>
    
      <script src="chrome://zotero/content/include.js"/>
    
    
    </dialog>

    enter image description here

    0 回复  |  直到 3 年前
        1
  •  0
  •   Minyi Han    3 年前

    这很奇怪,现在它工作了,当我设置 width 属于 checkbox 通过使用 width ='250'