There is no visible text according to mouse keys or a coworker's
visual inspection. lvPopulate adds column headers if any, then
populates the items. Initially I didn't put anything in oLV.Columns
unless I had column headers; could that be the problem? I was adding
to oLV.Items and populating item.text for each item; and I could see
the items in MSAA but not on screen.
Now, I'm trying to create one oLV.Columns entry without a header when
I don't have one to put there, before adding items and item.Texts...
but now I'm getting a lockup bad enough to cause an error report, and
I haven't figured that one out yet. That one may be a problem in my
code, but I can't see how yet because in the first (columnless)
incarnation, I got the appropriate number of items.
On Mon, Nov 09, 2009 at 10:01:45AM -0500, Aaron Smith wrote:
Doug,
So what, exactly, does ctrl.lvPopulate(oLV) do? Also, can you use the
mouse keys to review the control to find out if there's visible text in
the listview? Alternatively, you could send me a screen shot of the dialog.
Aaron
On 11/6/2009 1:42 PM, Doug Lee wrote:
>Got a stumper here, hopefully because I'm missing something
>embarrassingly simple.
>
>I have a script-generated dialog consisting of a listview and OK and
>Cancel buttons. The dialog displays in response to a keystroke
>(Ctrl-Shift-D), and all three controls show up and have screen space
>enough for text. The problem is that the listview shows as empty and
>is not arrowable even though it claims to have 22 items. XML and VBS
>code follow.
>
>I can prove the following about the listview:
>
> - It has 22 items (oLV.Items.Count = 22).
>
> - WE's "read current line" command says focus is on item 1 of 22,
> but also that there is no selected item.
>
> - Arrows do not change the "1" to another number (I tried all four
> arrows).
>
> - During creation, oItem.Text contains text.
>
> - oLV.Window.Accessible.Children(*).Name contain text.
>
>I conclude from this that the control is populated properly but for
>some reason not showing or reacting properly.
>
>The question, of course, is why. I have played with having the
>listview
>
> - Enabled or disabled during population.
> - Visible and invisible during population.
> - Width auto instead of group.
> - In an orientation=vertical group.
>
>but so far, the box insists on displaying as empty.
>
>
>XML data for the listview:
>
> <dialog id="DoDropDown" modal="no">
> Select Option
> <group width="group" justify="center">
> <static wordwrap="yes">
> Choose an option and press Enter, or press
> Esc to cancel.
> </static>
> <spacer/>
> <listview id="lv_options" view="details"
> selection="single" width="group">
> <!-- Built entirely in code because column
> count, names, and even headers or
> headerlessness vary. -->
> </listview>
> <spacer/>
> <group width="group" justify="center">
> <button default="yes" width="+30"
> widthclass="button" shortcut="o"
> id="button_ok">OK</button>
> <button shortcut="c" widthclass="button"
> system="cancel"
> id="button_cancel">Cancel</button>
> </group>
> </group>
> </dialog>
>
>And the dialog event handler. Notes: In the dialog creation section,
>there is an ctrl.lvPopulate call. I proved that this call is
>populating oLV.Items with text and data values. Ctrl is a custom
>VBScript class object is created when the keystroke is pressed.
>Apologies, btw; I normally don't like posting a big code block and
>asking someone else to debug it... but event handlers seem to need to
>be posted in whole.
>
>function DDEventHandler(dObj, dEvent, dId, dControl, ctrl)
>' The Select From Dropdown dialog event handler.
>' Ctrl is the CustomDropDown object for which this dialog exists.
> DDEventHandler = False
> Select Case dId
> case "lv_options"
> if dEvent = listviewFocus or dEvent =
> listviewItemChanged then
> if dControl.Items.Selected.Count = 1 then
> dObj.Control("button_ok").Enabled =
> True
> dObj.Control("button_ok").Default =
> True
> dObj.Control("button_cancel").Default =
> False
> else
> dObj.Control("button_ok").Enabled =
> False
> dObj.Control("button_ok").Default =
> False
> dObj.Control("button_cancel").Default =
> True
> end if
> end if
> DDEventHandler = True
> exit function
> case "button_ok"
> If dEvent = buttonClicked Then
> dim oItem : set oItem =
> dObj.Control("lv_options").items.selected(0)
> dim idx : idx = oItem.data
> dObj.close
> ctrl.selectOption(idx)
> DDEventHandler = True
> exit function
> end if
> case "button_cancel"
> If dEvent = buttonClicked Then
> speak cfg.strings("editCancel")
> dObj.close
> DDEventHandler = True
> exit function
> end if
> case else
> If dEvent = dialogCreated Then
> DDIsVisible = True
> dim oLV : set oLV =
> dObj.Control("lv_options")
> ctrl.lvPopulate(oLV)
> DDEventHandler = True
> exit function
> elseIf dEvent = dialogClosing Then
> DDIsVisible = False
> DDEventHandler = True
> exit function
> end if
> end select
>end function
>
>
--
To insure that you receive proper support, please include all past
correspondence (where applicable), and any relevant information
pertinent to your situation when submitting a problem report to the GW
Micro Technical Support Team.
Aaron Smith
GW Micro
Phone: 260/489-3671
Fax: 260/489-2608
WWW: http://www.gwmicro.com
FTP: ftp://ftp.gwmicro.com
Technical Support & Web Development
--
Doug Lee, Senior Accessibility Programmer
SSB BART Group - Accessibility-on-Demand
mailto:[email protected] http://www.ssbbartgroup.com
"While they were saying among themselves it cannot be done,
it was done." --Helen Keller