Closed Bug 272528 Opened 20 years ago Closed 20 years ago

Multicolumn Listbox not Highlighting Selected Row

Categories

(Core :: XUL, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: nbjayme, Assigned: jag+mozilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

I've got a <vbox> with <listbox> and <groupbox> within.
The groupbox is collapsed and I have a button to make it viewable when a user
wants to add/update a data on the listbox.  I also have
a working javascript to append a row of data on the multi-column listbox.

When you try to select the item/row, starting from the portion where the
groupbox is suppose to appear, it is not highlighted. The row/item is selected
but the listbox highlighter (color) is not showing it. As if, the groupbox
control and child elements within it are messing with the listbox highlight
renderer even if such groupbox is in collapsed/hidden mode.

======
    <vbox flex="1" >
      	  <listbox id="account-listbox" flex="1">
            <listcols>
              <listcol flex="1" />
              <listcol flex="2" />
              <listcol flex="1" />
              <listcol flex="1" />
            </listcols>
            <listhead>
              <listheader label="Account" />
              <listheader label="Particulars" />
              <listheader label="Debit" />
              <listheader label="Credit" />
            </listhead>
      	  </listbox>
      <groupbox  id="edit-groupbox" collapsed="true" flex="1" orient="vertical">
        <caption>
           <label value="Edit form" />
        </caption>
        <hbox flex="1">
         <grid flex="2">
          <columns>
            <column flex="0"/>
            <column flex="1"/>
          </columns>
          <rows>
            <row>
               <label value="Account code:" control="account-text" />
               <hbox flex="1">
                       <textbox id="account-text" flex="1" hiddenvalue=""
readonly="true" />
                       <button label=".."
oncommand="jsAction('Account-Selection');" />
               </hbox>
            </row>
            <row>
                <label value="Expense code:" control="expense-text" />
                <hbox flex="1">
                      <textbox id="expense-text" flex="1" hiddenvalue=""
readonly="true" />
                      <button label=".."
oncommand="jsAction('Expense-Selection');"/>
                </hbox>
            </row>
            <row>
                 <label value="Parcela code:" control="parcela-text" />
                 <box align="left">
                 <textbox id="parcela-text"  />
                 </box>
            </row>
          </rows>
        </grid>
        <grid flex="1">
          <columns>
            <column flex="0"/>
            <column flex="1"/>
          </columns>
          <rows>
            <row>
                   <label value="Debit amount:" control="debit-text" />
                   <textbox id="debit-text" value="0.00"/>
            </row>
            <row>
                   <label value="Credit amount:" control="credit-text" />
                   <textbox id="credit-text" value="0.00"/>
            </row>
          </rows>
        </grid>
        </hbox>
      </groupbox>
    </vbox>
=======



Reproducible: Always
Steps to Reproduce:

Actual Results:  
Listbox highlighter goes invisible but the item/row in the listbox is selected.

Expected Results:  
It should consistently highlight the selected row/items.
I now have found the source of the problem. 
1) Show Group Box Edit Form
2) Update or Add Row to List
3) Hide Group Box Edit Form

Number 2 and 3 must be interchanged.  You need to Hide the Group Box before
updating/adding the row of data to the list box.

Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.