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: 
Alternative solution:

```
input_data %>%
  mutate(id = as.integer(cut(x_data, breaks = 0:max(x_data)))) %>%
  group_by(id) %>%
  summarize(sum = sum(y_data)) %>%
  mutate(cumsum_ydata = cumsum(sum))

```
Though not the most elegant solution, if you wanted/neded a brute-force base R approach:

```
want <- matrix(NA, ncol = 2, nrow = length(x_steps))
for(xx in seq_along(x_steps)){
  res <- seq(x_steps[xx], x_steps[xx] + 1, 0.0001)
  want[xx,] <- c(x_steps[xx], 
                 max(cumsum(input_data[input_data$x_data %in% res[-length(res)], "y_data"])))
}

```

Output:

```
#>want
#[,1]     [,2]
#[1,]    2 3.308344
#[2,]    3 1.581712
#[3,]    4 2.660372
#[4,]    5 0.899825

```

If the steps are truly lower resolution, an easier `dplyr()` approach may be to use `floor()` then perform some basic functions:

```

input_data %>% 
  group_by(floor(x_data)) %>% 
  mutate(cum_sum = cumsum(y_data)) %>%
  filter(row_number() == n()) %>%
  select(cum_sum)

```

Output:

```
  `floor(x_data)` cum_sum
            <dbl>   <dbl>
1               2   3.31 
2               3   2.47 
3               4   2.76 
4               5   0.900

```