Page 1 of 1

RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Tue Oct 12, 2010 6:56 am
by MIGUELON
Hi Roger as in DCGETOPCIONS there [RESTOREDEFAULTSBUTTON] for windows
There any way to restore the default values of a DCBROWSE

Greetings
Miguel

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Tue Oct 12, 2010 9:26 am
by rdonnay
Try this:

Code: Select all

oBrowse:restoreDefaults()

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Tue Oct 12, 2010 12:15 pm
by MIGUELON
Thanks for the help, but this solution would force me to create a new button on all the windows that I have a DCBROWSE and thus to restore or not DCBROWSE initial values.
Not if there is another solution.

Thank you very much
Miguel

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Tue Oct 12, 2010 5:04 pm
by rdonnay
I am confused about what it is you want me to do.

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Wed Oct 13, 2010 12:50 am
by skiman
Hi Miguel,

With the suggestion of Roger, you could place this in the EVAL clause of DCREAD. This way you won't need a button.

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Wed Oct 13, 2010 1:35 am
by MIGUELON
Roger will try to explain:

I am using the DC_AutoRestoreBrowse () for the program to record the preferences of each user.
This function works for me very well, but there are times when the columns are repositioned and need to appear in the original order.
Why I wanted to know how to restore a DCBROWSE to baseline.
I answer that the solution is OBrowser: restoreDefaults ()
For each user of my program to restore the initial values of each window in my application has a DCBROWSE all I can do is put a button to restore factory settings.
In my application there are many DCBRWROSE and this would be a tough job.
As I could see that there is the option DCGETOPTIONS [RESTOREDEFAULTSBUTTON] that automatically adds a button in the left corner and down that we can restore the initial settings screen. This option is brilliant.

My question is:

YOU CAN ADD AS A BUTTON IN A RESTOREDEFAULTSBUTTON DCBROWSE?

If not, what would be the optimal choice for my clients to restore their initial values of each DCBROWSE listed on application.

Thank you very much for your time
Miguel

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Wed Oct 13, 2010 9:20 am
by rdonnay
Look at the following sample program:

\exp19\samples\browse\autorest.prg.

Re: RESTOREDEFAULTSBUTTON IN DCBROWSE

Posted: Wed Oct 13, 2010 2:49 pm
by MIGUELON
Thanks Roger, this example is what I wanted and I have solved the problem

Greetings
Miguel ;)