Page 1 of 1

confirmation dialogs are not showing but are there

Posted: Fri Mar 30, 2018 7:27 pm
by 16582483
In the IDE, there is a confirmation box that asks if I want to--but I cannot see it. It must be off the screen.

How can I get it to display somewhere on my screen? (i.e. which file holds the coordinates for where it is displayed?)

Ed Dressel

Re: confirmation dialogs are not showing but are there

Posted: Tue Apr 03, 2018 6:54 am
by yeray
Hello Ed,

Do you mean some confirmation dialog in the TeeChart editor?
The only form size and position saved can be reset at the "Options" dialog, accessible at design time:
bds_2018-04-03_08-52-17.png
bds_2018-04-03_08-52-17.png (8.69 KiB) Viewed 10818 times
bds_2018-04-03_08-51-54.png
bds_2018-04-03_08-51-54.png (7.12 KiB) Viewed 10813 times

Re: confirmation dialogs are not showing but are there

Posted: Tue Apr 03, 2018 9:05 pm
by 16582483
Thank you. That seems to fix it while I'm in the IDE but if I restart it, I have to reset the positions again.

What file are the settings saved to?

Thanks,

Ed Dressel

Re: confirmation dialogs are not showing but are there

Posted: Wed Apr 04, 2018 6:56 am
by yeray
Hello,

These settings are saved in the "Left", "Top", "Width", "Height", "RememberPosition" and "RememberSize" registry keys at "HKEY_CURRENT_USER\Software\Steema Software\TeeChart Pro\Editor".
Try opening the IDE with high privileges (as administrator) so it can write to the registry.

Re: confirmation dialogs are not showing but are there

Posted: Mon Apr 09, 2018 6:25 pm
by 16582483
Thank you for the quick response. (I didn't think KEY_CURRENT_USER required admin rights to change).

I started Delphi (Seattle) as admin and reset the positions and confirmed that the confirmation dialog displayed when went to delete a series.

Closed Delphi and reopened as non-administrator. I went to delete a series and I cannot find the confirmation dialog.

Notes: 1) I did monitor the changes to the registry and "Left" changed from 2b0 to a30, but everything else remained the same.
2) I use dual monitors (shouldn't matter but may).

Thanks,

Ed Dressel

Re: confirmation dialogs are not showing but are there

Posted: Wed Apr 11, 2018 1:43 pm
by yeray
Hello Ed,

I'm afraid I was wrong here:
Yeray wrote:The only form size and position saved can be reset at the "Options" dialog
We store the position of the Chart Editor, but also for the PrintPreview form. And the later is being saved at a wrong registry key (now fixed):
http://bugs.teechart.net/show_bug.cgi?id=2028

The confirmation dialog shown when you are about to delete a series:
Project3_2018-04-11_15-38-16.png
Project3_2018-04-11_15-38-16.png (15.01 KiB) Viewed 10685 times
This window is positioned relative to the series listbox. Here the code at TeePenDlg.pas:

Code: Select all

Function TeeYesNo(Const Message:String; Owner:TControl=nil):Boolean;
var x : Integer;
    y : Integer;
Begin
  Screen.Cursor:=crDefault;
  if Assigned(Owner) then
  begin
    x:=Owner.ClientOrigin.X+20;
    y:=Owner.ClientOrigin.Y+30;
    result:=MessageDlgPos(Message,mtConfirmation,[mbYes,mbNo],0,x,y)=mrYes;
  end
  else result:=MessageDlg(Message,mtConfirmation,[mbYes,mbNo],0)=mrYes;
End;
Since ou own the sources, you could debug to see what values do x and y variables have when the MessageDlgPos function is called.
Ed Dressel wrote:Thank you for the quick response. (I didn't think KEY_CURRENT_USER required admin rights to change).

I started Delphi (Seattle) as admin and reset the positions and confirmed that the confirmation dialog displayed when went to delete a series.

Closed Delphi and reopened as non-administrator. I went to delete a series and I cannot find the confirmation dialog.

Notes: 1) I did monitor the changes to the registry and "Left" changed from 2b0 to a30, but everything else remained the same.
2) I use dual monitors (shouldn't matter but may).
I'd check the permissions for your user as explained below (from here).
The machine on which you run this code has had that particular key secured to limit write access. Check if this is the case from regedit. Navigate to the key, right click on the key in the tree view and select Permissions. Select your user name and see what permissions you have. You should have Allow checked for both Full Control and Read
As a note aside, I have shortcuts to all the IDEs with "run as administrator" option set at their properties, and I always run the IDEs from these shortcuts to avoid similar problems.