Results 1 to 4 of 4

Thread: Saving cellbackcolor on exit

  1. #1
    Guest
    I have written code to color the grid cell yellow to highlight that the data has changed, however once the form is closed or refreshed the cell color goes back to default. How can i store the cell color before the form closes for each cell, preferably without running a loop procedure for every cell which will increase shutdown time, but preferably at the time when the cellcolor is changed.

  2. #2
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    Well if you are not closing down the project entirely and just closing the form then you could set up global variables to record the color of each cell. Alternatively if you do not need to unload the form on exit then just hide the form and it should be the same when you show it again. IF however the project needs to be shut entirely you will need to save off your details to file and then read it in on the form load.

    Hope this helps.

  3. #3
    Guest

    Chance of any code, please!!

    Is this achieved using a property bag and if so could you please write some code to illustrate how to read the cell back color for each cell within a 4 x 32 grid

    Many Thanks

  4. #4
    Hyperactive Member
    Join Date
    Feb 2000
    Posts
    284
    Well if I understand your question correctly thjis has nothing to do with a property bag. A property bag is used in a user control to set up values for some of its properties. As I understand you are just using a grid in a form and you want to save the cell colors. Well if none of the suggestions I gave in my last post work you will probably have to write them to a file which will mean looping through each cell and recording each backcolor. But in a 4* 32 cell grid not much time would be taken for that operation.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width