0

Rendering accuracy

asked 2008-09-11 23:24:30 +0800

zuzsso gravatar image zuzsso
48

updated 2013-01-22 11:37:22 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Why this sentence

`<combobox width="100px"/>`

doesn't produce a combo box 100 pixels long? The whole box doesn't measure 100 pixels, but 118 pix. That happens the same to the

 <separator>

objects. This sentence

  <separator width="3px"/>

produces one of 4 pix. The sentence

<textbox width=100px/>

produces one of 108 pix. It makes me difficult to do layout

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2008-09-17 09:16:39 +0800

iantsai gravatar image iantsai
2755 1

can you post a bug to ZK1 from SF.net?

link publish delete flag offensive edit

answered 2008-09-18 01:59:30 +0800

flyworld gravatar image flyworld
155 3

after i tried , the combobox's 100px is add to the input element and the additional 18px is the button ...:(
but the width of separator and textbox are correct .
maybe you can provide some sample code ?

link publish delete flag offensive edit

answered 2008-09-19 17:56:54 +0800

zuzsso gravatar image zuzsso
48

Please have a look:

http://84.121.1.36:8080/demoRCM/formularioIndividuos.zul

The source code of this page is:

<zk>   
   <separator/>
   <hbox>
      <separator width="2px" orient="vertical"/>
      <toolbar width="570px">
         <toolbarbutton label="Prim"/>
         <toolbarbutton label="Ante"/>
         <toolbarbutton label="Sigu"/>
         <toolbarbutton label="Ulti"/>
         <toolbarbutton label="Nuev"/>
         <toolbarbutton label="Elim"/>
         <toolbarbutton label="Guar"/>
         <toolbarbutton label="Desc"/>
      </toolbar>
   </hbox>
   <separator/>

   <hbox spacing="3">               
      <vbox><separator width="2px" orient="horizontal"/></vbox> <vbox>Numero<textbox width="97px"/></vbox> <vbox>Apellido 1<textbox width="166px"/></vbox> <vbox>Apellido2<textbox width="166px"/></vbox> <vbox>Nombre <textbox width="117px"/></vbox>
   </hbox>

   <hbox spacing="3">               
      <vbox><separator width="2px" orient="horizontal"/>
      </vbox> 
      
      <vbox>DNI<textbox width="97px"/>
      </vbox> 
      
      <vbox>NSS<textbox width="97px"/>
      </vbox> 
      
      <vbox>CIP<textbox width="97px"/>
      </vbox> 
      
      <vbox>   
         <vbox>Fecha Nacmnto.
            <hbox>
               <textbox width="29px"/>
               <textbox width="29px"/>
               <textbox width="50px"/>
            </hbox> 
         </vbox>    
      </vbox>
      <vbox>
         Estado<combobox width="106px"/>
      </vbox>
   </hbox>

   <hbox spacing="3">   
      <vbox><separator width="2px" orient="horizontal"/>
      </vbox> 

      <vbox>Numero Registro<textbox width="120px"/>
      </vbox> 

      <vbox>Causa Otros<combobox width="120px"/>
      </vbox>
   </hbox>

   <separator/>
   <tabbox width="600px">
      <tabs>
         <tab label="Datos"/>
         <tab label="Tumores"/>
         <tab label="Muerte"/>
         <tab label="Observaciones"/>
      </tabs>
      <tabpanels>
         <tabpanel>
            <hbox spacing="3">
               <vbox>Sexo<combobox width="22px"/></vbox> <vbox>E.C.<combobox width="22px"/></vbox> <vbox>Edad<textbox width="36px"/></vbox> <vbox>Nombre Completo<textbox width="432px"/></vbox>
            </hbox>
            <hbox>
               <vbox>Comunidad<combobox width="180px"/></vbox> <vbox>Provincia<combobox width="177px"/></vbox> <vbox>Municipio<combobox width="146px"/></vbox>
            </hbox>
            <hbox>
               <vbox>Telefono<combobox width="144px"/></vbox> <vbox>ProvinciaNacimiento<combobox width="177px"/></vbox> <vbox>Municipio Nacimiento<textbox width="199px"/></vbox>
            </hbox>
            <hbox>
               <vbox>Domicilio<combobox width="222px"/></vbox> <vbox>Entidad Colectiva<combobox width="306px"/></vbox> 
            </hbox>

            <hbox>
               <vbox>Ocupacion1<combobox width="553px"/></vbox>
            </hbox>

            <hbox>
               <vbox>Ocupacion2<combobox width="553px"/></vbox>
            </hbox>

            <hbox>
               <vbox>Ocupacion3<combobox width="553px"/></vbox>
            </hbox>
         </tabpanel>

         <tabpanel>
            
               <listbox>
                  <listhead sizable="false">
                     <listheader label="Tumor" sort="auto"/>
                     <listheader label="Base Diag." sort="auto"/>
                     <listheader label="Localizacion" sort="auto"/>
                     <listheader label="Fecha Incid" sort="auto"/>
                  </listhead>
                  <listitem>
                     <listcell> <combobox width="205px" value="Tumor001"/> </listcell>
                     <listcell label="Bases001"/>
                     <listcell label="Local001"/>
                     <listcell label="Fecha001"/>
                  </listitem>
                  <listitem>
                     <listcell> <combobox width="205px" value="Tumor002"/> </listcell>
                     <listcell label="Bases002"/>
                     <listcell label="Local002"/>
                     <listcell label="Fecha002"/>
                  </listitem>
                  <listitem>
                     <listcell> <combobox width="205px" value="Tumor003"/> </listcell>
                     <listcell label="Bases003"/>
                     <listcell label="Local003"/>
                     <listcell label="Fecha003"/>
                  </listitem>
                  <listitem>
                     <listcell> <combobox width="205px" value="Tumor004"/> </listcell>
                     <listcell label="Bases004"/>
                     <listcell label="Local004"/>
                     <listcell label="Fecha004"/>
                  </listitem>
                  <listitem>
                     <listcell> <combobox width="205px" value="Tumor005"/> </listcell>
                     <listcell label="Bases005"/>
                     <listcell label="Local005"/>
                     <listcell label="Fecha005"/>
                  </listitem>
               </listbox>      
            

         </tabpanel>

         <tabpanel>            
            <hbox>
               <vbox>Fecha<textbox width="156px"/></vbox> <vbox>Numero Colegiado<textbox width="178px"/></vbox> <vbox>Lugar Muerte<combobox width="203px"/></vbox>
            </hbox>

            <hbox>
               <vbox>Autopsia<combobox width="175px"/></vbox> <vbox>Causa B. Muerte<combobox width="105px"/></vbox> <vbox>Causa Muerte<combobox width="105px"/></vbox> <vbox>Causa Muerte<combobox width="93px"/></vbox>
            </hbox>

            <hbox>
               <vbox>CIE 9<textbox width="156px"/></vbox> <vbox>CIE 9<textbox width="178px"/></vbox> <vbox>CIE9<combobox width="203px"/></vbox>
            </hbox>

            <hbox>
               <vbox>CIE 10<textbox width="156px"/></vbox> <vbox>CIE 10<textbox width="178px"/></vbox> <vbox>CIE 10<combobox width="203px"/></vbox>
            </hbox>

            <hbox>
               <vbox>Observaciones<textbox width="570px" rows="6"/></vbox> 
            </hbox>
         </tabpanel>
         <tabpanel>
            <hbox>
               <vbox>Observacion Individuo (este pasa a registro)<textbox width="570px" rows="6"/></vbox> 
            </hbox>

            <hbox>
               <vbox>Observacion<textbox width="570px" rows="3"/></vbox> 
            </hbox>

            <hbox>
               <vbox>Fech. Ult. Cont.<textbox width="156px"/></vbox> <vbox>Usuario Portatil<textbox width="178px"/></vbox> <vbox>Fecha Portatil<combobox width="203px"/></vbox>
            </hbox>
         </tabpanel>
      </tabpanels>
   </tabbox>
</zk>


Combos, textboxes and separators on the first tab don't fit with the measurement indicated on source. Regards

link publish delete flag offensive edit

answered 2008-09-20 12:54:57 +0800

zuzsso gravatar image zuzsso
48

One more thing: on comboboxes, the button are 18 px long. If you have to put one, you have to add 18 px to the length of combo. But... on textboxes you have to add 4 px and there's not button

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2008-09-11 23:24:30 +0800

Seen: 318 times

Last updated: Jan 22 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More