Ask Your Question

Initialize Dialog Selecting First Item to Listbox...

asked 2016-09-30 01:46:26 +0200

ago_med gravatar image

updated 2016-09-30 04:20:07 +0200

mark_t gravatar image

good evening..

I created a dialog ("Dialogo") with two listbox..

And i need to when i initialize this dialog, the first item to "ListBox_Itens" automaticaly can be selected...

this image below show what i need...

image description

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-09-30 02:44:08 +0200

mark_t gravatar image

Example basic code for initialising the listbox when the dialog is started:-

Sub Main

    Dim vControl As Variant

    MySampleDialog = CreateUnoDialog(DialogLibraries.Standard.Dialog1)

    vControl = MySampleDialog.getControl("ListBox_Previa")
    vControl.selectItemPos(0, True)

End Sub
edit flag offensive delete link more


Thanks mark_t...

it's working...

ago_med gravatar imageago_med ( 2016-09-30 03:34:11 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-09-30 01:46:26 +0200

Seen: 340 times

Last updated: Sep 30 '16