List of and elements

Hello everyone,

I am quite stymied as why the subject of this thread turns up sweet-blow-all in the search results on the internet, except perhaps that I, an experienced GW-Basic,Thoroughbred Basic and Visual Basic programmer, am not understanding about how to use “” statements. Oh, that’s totally possible, yes.

So I’m working with hints like

Sub J_FNFilePicker
	' ---- From his Ref Card document about dialog controls
	Dim oFilePicker As Object
	Dim FileName As String
	FileName = ""
	'FilePicker initialization
	oFilePicker = CreateUnoService("")
	oFilePicker.DisplayDirectory = ConvertToURL("C:\Path\To\SomeDir")
	oFilePicker.appendFilter("Calc Documents", "*.ods")
	oFilePicker.CurrentFilter = "Calc Documents"
	oFilePicker.Title = "Select a Calc document"
	'execution and return check (OK?)
	If oFilePicker.execute = _ Then
			FileName = oFilePicker.Files(0)
	End If
End sub

And if there’s isn’t a list, I’m making one.

  1. I remember reading somewhere that they’re case-sensitive.

I started with the following list drawn from Nifenecker’s RefCard #6, and then I found code in Pitonyak’s document that produced a lo-o-o-ong list of, which is, as yet, Martian to me.

SYNTAX: oFilePicker = CreateUnoService("")

' ==== CONTROLS ' ---- File selection dialog ' ---- Refined file selection dialog ' ---- Refined file selection dialog ' ---- Folder selection dialog ' ---- Refined folder selection dialog ' ---- Refined folder selection dialog
' ==== ' ---- e.g. vbOkonly, vbYesNoCancel (a guess)

et cetera

I could really use all the help I can get. I’m new here, and I’m new to these forums (so I’m just waiting to flamed by a mod because I’m posting this in the wrong place – sorry!) and it’s a bit demotivating to have been through some topics and lot of replies are wishy-washy, with very few “Yay it worked!” responses. My favourite was in the lines of “Is there, like, a beginner manual?” (like for me who at least knows what Option Base 1 means), and the reply was “No, there isn’t.” And that was the end of that… So my hopes aren’t really up there.

I’m actually trying to write a UI for a spreadsheet payroll system that I wrote. (Note please that I am not looking for anyone to suggest using LO Base or available payroll systems to me, this is a personal “Learn LO Basic” project.) I’ve got as far as creating a number of dialogs with text boxes and checkboxes and things, and task #next is to populate them with spreadsheet information and click NEXT / PREVIOUS buttons to just LOOK at the information and, oh, my sweet baby Apollo, I feel as dumb as a withered plant…

I’ve got this, and it works! Yay! (I am aware that “Example:” will never execute, it means nothing there.)

Sub frmAddEmployee_load()
	Dim lLibrary
	Dim fLibraryAddEmployeeForm     'Dialog as stored in the library
	Dim frmReviewEmployee As Object
	lLibrary = DialogLibraries.getByName("Standard")
	fLibraryAddEmployeeForm = lLibrary.getByName("frmAddEmployee")
	frmReviewEmployee = CreateUnoDialog(fLibraryAddEmployeeForm)
	Exit Sub
	' Set my combo box for properties, methods, and services
	aControl = oDlg.getControl("myComboBox")
	aControl.addItems(Array("properties", "methods", "services"), 0)
End Sub

Then in the next routine, 4th last line, I’m cycling through my myriad controls to enabe this, hide that, first up, checkbox. Presumably I have to declare UNO variable of type checkbox, make my checkbox an instance of said UNO variable, declare each property thereof that I want to prod, with and make my checkbox’s properties instances of said property, because what I’m trying below isn’t working and I’m stuck. I don’t know what else to do.

Sub frmJJPayroll_load()
'    Sub frmAddEmployee_Load()
'	    Dim WidgetX 'As What?	
'	    WidgetX = frmPayroll.getControl("fraButtons")
'	    Print "lol " & widgetx.DBG_properties
'	    WidgetX.label = ""
    'End Sub

	REM Declare the primary variables
	Dim lLibrary
	Dim fLibraryJJPayrollForm     'Dialog as stored in the library
	Dim frmPayroll As Object
	Dim WidgetX
	Dim empStatic As EmployeeStaticRecord ' ---- user-defind type, Name as String, Surname as String, bla bla bla
	REM Load the library and the dialog
	lLibrary = DialogLibraries.getByName("Standard")
	fLibraryJJPayrollForm = lLibrary.getByName("frmJJPayroll")
	frmPayroll = CreateUnoDialog(fLibraryJJPayrollForm)
	frmpayroll.getmodel.title= "Welcome to " & APP_NAME & "!"
	' ---- Fix the checkbox
	WidgetX = frmPayroll.getcontrol("chkAutoNumber")
	Print WidgetX.DBG_properties
End Sub

I need a list like the above that I expect to see entries like the following on it. I NEED that LIST! ‘ ---- I haven’t tried this but I presume it exists ‘ ---- now I’m sucking things out of my thumb

Then, there’s this “” thing…

It LOOKS like I can create properties of any name whatsoever, and I am not grasping from the handful of examples I have at my disposal how Basic knows which control I’m creating properties for. I’ve got
PropertyX(0).Name as “Age”, PropertyX(0).Value as 27,
and PropertyX(1).Name as “Weight” and PropertyX(1).Value as 97,
and PropertyX(2).Name as “FavouriteMilkshakeFlavour” and PropertyX(2).Value as “Butterscotch”
But they don’t seem to be properties OF anything and I just. Don’t. Get it.

Anyone feel like suffering a fool?



Sorry but I got tired of reading through all this and decided maybe this will get you started:

Namespace List

Thank you, I’m sure it will help. Opaque also replied with a useful looking similar. However, where are the controls?? I see a FRAME (useless as frames may be) and a FORM and a TEXT (which i doubt refers to a UNO). So there’s basically ONE control type on the list: FRAME.

If anyone has anything other than “tl;dr” to say, I’m still here.



When there is an arrow to the left of the category there are sub categories. Click on the arrow to open and there, under ‘Form’ you will find ‘Control’.

Aaah! Wonderful.

Thank you very much!