Question: So for the program I'm writing I have an overview of notes the user created. This I created with `TextBox`es that are generated from database values. I want the user to not be able to enter and change anything in this overview.  

I tried to use `tb.ReadOnly = true;` but this doesn't disable the entering of the textbox.  

After that I tried `tb.Enabled = false;` but this applies a gray out to all the text.

Is there any way to remove this gray out or just make the `TextBox` unchangeable without any visual difference?

Answer: 
We can try

```
library(tidyverse)

input_data |>
           mutate(x_steps = rev(trunc(x_data))) |>
           group_by(x_steps) |> 
           summarise(cum_y_data = sum(y_data)) |>
           mutate(cum_y_data = rev(cum_y_data)) |> 
           mutate(cum_y_data = cumsum(cum_y_data))

```

* output

```
# A tibble: 4 × 2
  x_steps cum_y_data
    <dbl>      <dbl>
1       2      0.550
2       3      2.80 
3       4      5.68 
4       5      7.21 

```
Another `tidyverse` approach: Last 2 lines same as @deschen:

Main challenge is to group for summing. Here we use a combination of `coalesce`, `str_extract` and `parse_number` to group:

```
library(tidyverse)

input_data %>% 
  group_by(id = coalesce(parse_number(str_extract(x_data, '\\d+\\.'))+1, x_data)) %>% 
  summarise(sum = sum(y_data)) %>% 
  mutate(cumsum_ydata = cumsum(sum))

```

```
      id    sum cumsum_ydata
   <dbl>  <dbl>        <dbl>
 1     2  0.874        0.874
 2     3 49.2         50.1  
 3     4 48.7         98.8  
 4     5 45.0        144.   
 5     6 48.2        192.   
 6     7 49.1        241.   
 7     8 47.4        289.   
 8     9 46.1        335.   
 9    10 50.8        385.   
10    11 51.1        437.   
# ... with 154 more rows

```