Hello!
I want to manually input data to OpenCalc but I don't want to select the cell and then type the next number up.
If there is a way to create a couple of add and subtract buttons that I can click however many times to increase and decrease the value in a specific cell by one when needed, please let me know how.
Thanks
+1 & -1 buttons for tallying
-
Zenathalon
- Posts: 2
- Joined: Fri Dec 23, 2022 11:31 am
+1 & -1 buttons for tallying
OpenOffice 4.1.13
Windows 10
Windows 10
Re: +1 & -1 buttons for tallying
See topic Increment by real value using SpinButton
in this forum.
in this forum.
OpenOffice 1.1.5 – 4.1.16
LibreOffice 3.3.0.4 – 26.2
Windows 7,10,11 64-bit
LibreOffice 3.3.0.4 – 26.2
Windows 7,10,11 64-bit
Re: +1 & -1 buttons for tallying
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
-
Zenathalon
- Posts: 2
- Joined: Fri Dec 23, 2022 11:31 am
Re: +1 & -1 buttons for tallying
Those could work but they aren't exactly what I'm looking for. Certainly a step in the right direction though and good to know so I appreciate them both nonetheless.
I want the buttons to be side by side instead of above and below each other.
I've discovered for myself that dragging horizontally will lay the spinbuttons as such rather than vertically but I don't want arrows and I want the left most button to be the one to add rather than subtract which I can't seem to do with them.
Would the 'Push Button' option allow for this?
I've managed to place a couple and have them show a "+" and a "-" but I'm struggling to see any way to get them to do what I want them to.
Or is there another way?
Also, since I'll need to do this for hundreds of cells, is there a way to do so without manually placing everything down, kind of like how you can select a cell with a value and drag from it, up or down, to fill out a cell with an increment/decrement for cell away?
Thanks
I want the buttons to be side by side instead of above and below each other.
I've discovered for myself that dragging horizontally will lay the spinbuttons as such rather than vertically but I don't want arrows and I want the left most button to be the one to add rather than subtract which I can't seem to do with them.
Would the 'Push Button' option allow for this?
I've managed to place a couple and have them show a "+" and a "-" but I'm struggling to see any way to get them to do what I want them to.
Or is there another way?
Also, since I'll need to do this for hundreds of cells, is there a way to do so without manually placing everything down, kind of like how you can select a cell with a value and drag from it, up or down, to fill out a cell with an increment/decrement for cell away?
Thanks
OpenOffice 4.1.13
Windows 10
Windows 10
Re: +1 & -1 buttons for tallying
The orientation of the Spin Buttons depends on that how you drag the rectangle when you create the object.I want the buttons to be side by side instead of above and below each other.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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: LO3.3.0-25.8.5.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: +1 & -1 buttons for tallying
You must write and assign a macro (one or more subroutine) for them.Would the 'Push Button' option allow for this?
Last edited by Zizi64 on Sun Dec 25, 2022 12:06 pm, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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: LO3.3.0-25.8.5.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: +1 & -1 buttons for tallying
The macros - embedded in the attached file and assigned to the two buttons - will Increment/Decrement the value of the actual cell (if the cell is located in the column A).
| Edit: Edited: The code is fixed: I just copy-pasted the code from the first Sub to the second and I have not changed the +/- operation... |
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.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: LO3.3.0-25.8.5.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: +1 & -1 buttons for tallying
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: +1 & -1 buttons for tallying
There was a closely related question in the old askbot site for LibreOffice at the URL https://ask.libreoffice.org/en/question ... -by-a-day/ .
It was maintained as https://ask.libreoffice.org/t/50306 when ask.libreoffice.org moved to 'discourse'.
There I gave a "final" solution also covering every somehow specialized but often-used case (dates, DOT values, date-time stamps, cells formatted to display "percentages", whole numbers anyway, but also -in a specific way- numbers formatted to "scientific", and -as a joke- even Boolean. The slightly reworked version was of 2021-09-09.
Only for my own use I since added provisional support for parts of special texts containing numbers (like "12;3;7").
The fundamental concept requires to apply the functionality to any cell depending on its NumbeFormat attribute. This way you can use the same tool as well to increase a date by one week as to increase the scaling exponent of a "scientific" number by 3 (multiply by 1000), or simply to increase an ordinary integer by 10.
The "tool" must be called via a sensitive area of a toolbar therefore. Using keyboard shortcuts or FormControl buttons would require to define many because in both cases the call can't be modified (by Shift, Ctrl, Alt or combinations of these modifiers).
As the attached example shows, this solution is not really practical in some cases, particularly because it covers virtually all cases I could think of. Depending on a user's actual situation he (f/m) may want to specialize the proceeding, and the omission of some included effects may allow to add others I didn't think of.
My code is open and public domain, of course, but if you rework it, you should add a note about the fact at the beginning. This should avoid misunderstandings in the few cases where a user knows both variants.
If you try to test the attachment and don't find the toolbar: It is rather tiny, only contains the two sensitive command areas labeled 'Inc' and 'Dec', and may be placed in a strange position depeding on your user profile.
I'm no longer using AOO. When I just tested with AOO 4.1.7, it still didn't pass the modifier 'Alt' correctly to the event parameter of the called routine. Can't help insofar.
Please expect errors; I will not take any resposibility. No special support.
In the above mentioned thread there was a suggestion to make an extension of the "solution". If somebody wants to do so: fell free. (Some suppoprt in this case, too.)
It was maintained as https://ask.libreoffice.org/t/50306 when ask.libreoffice.org moved to 'discourse'.
There I gave a "final" solution also covering every somehow specialized but often-used case (dates, DOT values, date-time stamps, cells formatted to display "percentages", whole numbers anyway, but also -in a specific way- numbers formatted to "scientific", and -as a joke- even Boolean. The slightly reworked version was of 2021-09-09.
Only for my own use I since added provisional support for parts of special texts containing numbers (like "12;3;7").
The fundamental concept requires to apply the functionality to any cell depending on its NumbeFormat attribute. This way you can use the same tool as well to increase a date by one week as to increase the scaling exponent of a "scientific" number by 3 (multiply by 1000), or simply to increase an ordinary integer by 10.
The "tool" must be called via a sensitive area of a toolbar therefore. Using keyboard shortcuts or FormControl buttons would require to define many because in both cases the call can't be modified (by Shift, Ctrl, Alt or combinations of these modifiers).
As the attached example shows, this solution is not really practical in some cases, particularly because it covers virtually all cases I could think of. Depending on a user's actual situation he (f/m) may want to specialize the proceeding, and the omission of some included effects may allow to add others I didn't think of.
My code is open and public domain, of course, but if you rework it, you should add a note about the fact at the beginning. This should avoid misunderstandings in the few cases where a user knows both variants.
If you try to test the attachment and don't find the toolbar: It is rather tiny, only contains the two sensitive command areas labeled 'Inc' and 'Dec', and may be placed in a strange position depeding on your user profile.
I'm no longer using AOO. When I just tested with AOO 4.1.7, it still didn't pass the modifier 'Alt' correctly to the event parameter of the called routine. Can't help insofar.
Please expect errors; I will not take any resposibility. No special support.
In the above mentioned thread there was a suggestion to make an extension of the "solution". If somebody wants to do so: fell free. (Some suppoprt in this case, too.)
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
---
Lupp from München