Hello,
for the grid ("com.sun.star.awt.grid"), when its selection changes, is there a possibility to read the previous selection?
My thought is to use a listener whose event occurs immediately before that of the XGridSelectionListener, but in find None. For example the XMouseListener triggers only after the XGridSelectionListener.
Note:
I know that I can save the last selection (I mean the value of .CurrentRow) in a variable and then, when changing the selection, read the variable before changing the value of the variable again. But maybe there is a direct way via an event.
greetings,
Jörg
Catch event immediately before XGridSelectionListener?
Catch event immediately before XGridSelectionListener?
OOo 3.3.0 (Windows) AOO 4.1.7 (Windows) AOO 4.x (Xubuntu)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)
Re: Catch event immediately before XGridSelectionListener?
If this is a grid control in a dialog and what you want to do is beyond what it allows - then, it may be too involved for you, but my approach would be to create my own control using labels. A grid control is similar to a grid of label controls.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Catch event immediately before XGridSelectionListener?
This would be much more complicated than the possible alternative solution I had already mentioned myself:JeJe wrote:If this is a grid control in a dialog and what you want to do is beyond what it allows - then, it may be too involved for you, but my approach would be to create my own control using labels. A grid control is similar to a grid of label controls.
"I know that I can save the last selection (I mean the value of .CurrentRow) in a variable and then, when changing the selection, read the variable before changing the value of the variable again. But maybe there is a direct way via an event."
greetings,
Stephan
OOo 3.3.0 (Windows) AOO 4.1.7 (Windows) AOO 4.x (Xubuntu)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)
Re: Catch event immediately before XGridSelectionListener?
Yeah, much more involved, I'm throwing it out there as another option as people sometimes don't think of it... I've written controls based on labels countless times... and its not always all that difficult.
I looked and couldn't find what you're asking for... though not exhaustively... I presume you've used MRI and gone through everything you can see there?
Your post was disappearing down the page... sometimes several years later someone answers a post with a solution... but its not looking good for what you want being available from the people here right now... if its possible...
The best place to store that selection information might be the tag property of the control.
I looked and couldn't find what you're asking for... though not exhaustively... I presume you've used MRI and gone through everything you can see there?
Your post was disappearing down the page... sometimes several years later someone answers a post with a solution... but its not looking good for what you want being available from the people here right now... if its possible...
The best place to store that selection information might be the tag property of the control.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Re: Catch event immediately before XGridSelectionListener?
Yes, I searched with the XRAYTool.
greetings,
Stephan
greetings,
Stephan
OOo 3.3.0 (Windows) AOO 4.1.7 (Windows) AOO 4.x (Xubuntu)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)
my tips for AOO/LO (in the forum de.openoffice.info) · ProOO-Box - Information, instructions, supplementary materials about OpenOffice (german)