Bernard Marcelly wrote: [...]
Sub mySelectionOfDataBrowser Dim frame1 As Object, frame2 As Object Dim oModel As Object Dim oResults As Object Dim oGrid As Object Dim oDoc as object Dim oDataSourceBrowser as Object Dim oSelection as Variant Dim ii As Long
oDoc = thiscomponent frame1 = oDoc.CurrentController.Frame frame2 = frame1.findFrame("_beamer",4) if IsNull(frame2) then MsgBox("Beamer not found !", 16) Exit Sub end if oDataSourcebrowser = frame2.Controller oModel = oDataSourcebrowser.com_sun_star_awt_XTabController_getModel oResults = oModel.createResultSet oGrid = oDataSourceBrowser.CurrentControl oSelection = oGrid.Selection if UBound(oSelection) >= 0 then For ii= 0 To UBound(oSelection) if oResults.absolute(oSelection(ii)) then MsgBox( oResults.Columns(0).String & " : " & _ oResults.Columns(4).String ) else MsgBox("Position not found : " & oSelection(ii), 16) end if Next else MsgBox("No line selected in beamer", 16) end if End Sub
This would be a great snippet for our collection would someone who was interested in this thread mind to summerize at least the availability of constructs like oDataSourcebrowser.com_sun_star_awt_XTabController_getModel which is something maybe many people are searching but nobody beside Poalo knows that it exists.
http://codesnippets.services.openoffice.org/
Tom
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]