[Solved] Check Item in Listbox is selected or not
-
- Posts: 18
- Joined: Mon Jun 18, 2018 3:33 am
[Solved] Check Item in Listbox is selected or not
Hi guys, I have got one Listbox A with several items inside. It is in multi-selection mode. A user can select one or more items from it. When a user does, I want those selected items to appear inside another Listbox B. How can I do that with Macro in Calc Dialog Listbox?
Last edited by MINTHETNAUNG on Mon Jul 09, 2018 9:04 am, edited 1 time in total.
Openoffice 4.1.5 on Windows 10
Re: Check Item in Listbox is selected or not
If I know it exactly, there is not multiselection mode Listbox feature in the Apache OpenOffice and LibreOffice Calc...I have got one Listbox A with several items inside. It is in multi-selection mode.
Here are a similar topics:
viewtopic.php?f=39&t=67677
viewtopic.php?f=39&t=24299
Can you upload youe ODF type sample file here?
Last edited by Zizi64 on Fri Jun 29, 2018 12:00 pm, edited 2 times in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Check Item in Listbox is selected or not
Install the MRI extension
Point a list box event to macro:My_Macros>MriLib>Module1>Mri
Point a list box event to macro:My_Macros>MriLib>Module1>Mri
Listbox have a multi-selection property. You can use it without value binding.If I know it exactly, there is not multiselection mode Listbox feature in the Apache OpenOffice and LibreOffice Calc...
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Check Item in Listbox is selected or not
I found a short description:
https://wiki.openoffice.org/wiki/Docume ... I/List_Box
https://wiki.openoffice.org/wiki/Docume ... I/List_Box
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Check Item in Listbox is selected or not
That page describes the model of a lits box.Zizi64 wrote:I found a short description:
https://wiki.openoffice.org/wiki/Docume ... I/List_Box
Calling MRI from the loaded list box object, you get methods get/setSelectedItemsPos and get/setSelectedItems (aka pseudo-properties SelectedItemsPos and SelectedItems)
viewtopic.php?f=74&t=49294
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Check Item in Listbox is selected or not
I learned a useful thing again. Thank you Villeroy.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Check Item in Listbox is selected or not
Even simpler if you have MRI installed.
Select items and double-click the "Source" line in the MRI window.
Select items and double-click the "Source" line in the MRI window.
- Attachments
-
- multiselect.odt
- (8.97 KiB) Downloaded 181 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Check Item in Listbox is selected or not
I am using the Xray inspection tool.Even simpler if you have MRI installed.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Check Item in Listbox is selected or not
Write a Basic wrapper just like the MRI wrapper.
When I used Xray, I had this one which can inspect the elements of an array:
When I used Xray, I had this one which can inspect the elements of an array:
Code: Select all
Sub myXRay(optional v)
Dim i%,obj,x%,sRec$
Static iRec%
if ismissing(v) then v = ThisComponent
globalscope.basiclibraries.loadlibrary("XrayTool")
if isarray(v) then
iRec = iRec +1
for i = lBound(v) to uBound(v)
obj = v(i)
myXRay obj 'recursive for nested arrays
if (i< uBound(v)) then
If iRec > 1 then sRec$ = "[Recursion="& iRec &"] " : else sRec =""
x = msgbox(sRec & i -lBound(v)+2 &" / "& uBound(v) - lBound(v) +1,5,"X-ARRAY")
if x = 2 then exit for
endif
next
iRec = iRec -1
else
xray v
end if
End Sub
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice