On Thursday 06 March 2008 18:02:38 Robert Wood wrote:
> Hi folks,
>
> I want to set one of my comboboxes (set-up as selector) to go to a
> particular point in the table it is referencing when the form is opened.
> I have tried putting all sorts of things in the on open part of the form
> itself, but no matter what I try, the selector always displays the first
> value in the table.
>
> Is there a way to tell the combobox (or selector as it is in this case)
> to go to a particular row in the table and have that being displayed in
> the selector? I've tried things like this:
Within the On-Open, try first finding the row of the value of interest within
the table driving the combobox. Then set the combobox to that row.
rownum=hk_thisform.get_pyvisible("cbosubject").viewcolumn().find("value")
hk_thisform.get_pyvisible("cbosubject").listdatasource().goto_row(rownum)
Hope this works.
JAM
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hk-classes-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss