Hi Derek,


Great stuff as usual.... Thank you very much.......
Nice touch on adding line count.


I have added label name display above transaction tGrids. i.e. Instead of static label saying "Transactions History of selected product" it says "Transaction History of product: [product name]" by adding another label and fetching product name into second label. All good but two issues I couldn't solve:


1. Focus on tGrid rows works fine thanks to you. I wanted apply same focus - update on label that displays item name. When navigated product tab, it focuses on first row of the main and sub table and updates accordingly, which is great. I wanted update focused row record label name also automatically?
Currently label is only updated on click or keyboard up and down.

2. Fetching single field into label done, but I couldn't do it with two field. i.e. Displaying customer name and surname in single label?


ps/. Just noticed, when browsing records i.e. from customer tGrid, inv and inv items tGrids vertical scroll bar briefly appears and disappears over tGrids footer?


Sample project attached.

I couldn't get my head around to do this...


Attached sample project is based on one of Derek's kind help project.
Transactions items uses combobox  filter. Default displays all transactions, sales and refunds.
I wanted copy and display totals of filtered tGrid Total column footer value to respective edit boxes below the tGrid at all times but couldn't do it. Any help please?
https://s29.postimg.org/qr4f44ehj/zzzzz_Temp28.png

628

(2 replies, posted in General)

Hi Derek,


I was trying to get customer details displayed automatically on sale inv without choosing from cust combo.

Adding the following line under SaleInv onShow event seems to sort it out

frmSalesInv_cbSalesInvCustomer_OnChange ('');

Thanks for the reply.

629

(2 replies, posted in General)

Hi Derek,


I was re-checking out one of your sample project about issuing inv refunds. It's nice and neat approach.
I have two issues so far that I couldn't find solutions.


1. You are using tGrid specific focusing, which is nice and I like. However, if specified tGrid is not in view on run of app it returns "Cannot focus a disabled or invisible window" error message. It's more of an info message than a error as far as I can understand.  It happens when specified tGrid in tab pages and compiled when different tab page selected or when a form displayed such as app password form before main form. Is there any solution for it via script or even disabling the error message form?


Edit:
I think issue item 1 is sorted. I added
Form1.pagecontrol1.ActivePageIndex := 0;
under form1 onShow event.
However, issue item 2 below is still outstanding


2. I wanted to display some customer details on SaleInv form using customer combobox (cb2) but it didn't work. It works fine on SaleInvItem for product combo but same thing didn't on saleInv form?


Please see the attached sample project:

630

(14 replies, posted in General)

AD1408 wrote:

Thanks to Dmitry we have password strength meter...


It'd be great to add password generator to it too.
Attached sample project generated passwords are displayed in read only edit fields instead of a memo field. Reason for this is to be able to add various attributes to individual generated passwords.


--------


? ... Please...........
Sample project on post #1

631

(14 replies, posted in General)

Thanks domebil, but I'm not looking for compiled binaries. I need the script/code so that I can implement/modify it in my own MVD (and most likely other MVD users in their own) application.

632

(14 replies, posted in General)

Hi domebil,


It's a nice pw gen app but you gave only binaries... there is no source as far as I can see..

Hi Math,


I asked similar question sometime ago. You may find something useful in the following thread


http://myvisualdatabase.com/forum/viewtopic.php?id=2969

634

(14 replies, posted in General)

Thanks to Dmitry we have password strength meter...


It'd be great to add password generator to it too.
Attached sample project generated passwords are displayed in read only edit fields instead of a memo field. Reason for this is to be able to add various attributes to individual generated passwords.


--------

635

(7 replies, posted in General)

Thanks a lot EHW......


Mission accomplished as below:

procedure frmEnterPassw_OnShow (Sender: string; Action: string);
begin
  frmEnterPassw.Button1.Enabled := False;
end;

procedure frmEnterPassw_edPassword_OnChange (Sender: string);
begin
  if frmEnterPassw.edPassword.Text = '' then
      begin
      frmEnterPassw.Button1.Enabled := False;
      end else
      begin
      frmEnterPassw.Button1.Enabled := True;
      end;
end;

636

(7 replies, posted in General)

Thank you very much EHW......


I also wanted to disable find next button (OK button in my case) with the following. Disable part worked but not enable part:

procedure frmEnterPassw_OnShow (Sender: string; Action: string);
begin
  if frmEnterPassw.edPassword.Text = '' then
      begin
      frmEnterPassw.Button1.Enabled := False;
      end else
      begin
      frmEnterPassw.Button1.Enabled := True;
      end;
end;

637

(7 replies, posted in General)

1. Thanks... It would be handy if "ctrl+click" on cell added to tGrid right click menu as "Copy selected cell" in future to MVD.


2. The following cap of MVD script find dialog illustrates better what exactly I'm trying to do. User can click on Find Next button or click on keyboard Enter key when there is something to find typed in:
https://s8.postimg.org/cux9z6ebp/zzzzz_Temp26.png


3. Spin boxes / buttons on time component doesn't work for me. What am I missing?
https://s21.postimg.org/ydbzz5oif/zzzzz_Temp27.png

638

(13 replies, posted in General)

DriveSoft wrote:

AD1408
Unfortunately I can't understand what exactly you want to do. Why you use onCellClick event?


Edit:
------
Looks like I was thinking wrong way around. Adding a another procedure below for form1  worked OK beside frmDetails :
procedure Form1_edMainPassword_OnChange (Sender: string);
begin
  Form1.Label1.Caption := StrengthMeter(Form1.edMainPassword.Text);
end;

All good Dmitry. The above works.

639

(8 replies, posted in General)

Hi JB,


Thank you very much....


I was trying
Form1.mniReportDesigner.Visible := False;

640

(8 replies, posted in General)

Thanks to you guys (especially Math), I learned how to create new menus, adding menu items to MVD default menus etc.


However, I stuck on hiding MVD default menu / menu item. For instance, I wanted to keep MVD defult menu Options but hide the menu item Report designer under under Options menu?

641

(7 replies, posted in General)

1. How can I copy selected cell value to clipboard. Currently right click menu/copy copies to whole row.

https://s1.postimg.org/r6galfxcf/zzzzz_Temp23.png

For instance with right click on cell with a value wwww, I only want to copy cell value   wwww  to the clipboard. Is it possible?


2. On image below, beside clicking on OK button with mouse, how can I also click on Enter key on keyboard, associating button OK click to keyboard?

https://s21.postimg.org/ccvu446sn/zzzzz_Temp24.png


The following cap of MVD script find dialog illustrates better what exactly I'm trying to do. User can click on Find Next button or click on keyboard Enter key when there is something to find typed in:
https://s8.postimg.org/cux9z6ebp/zzzzz_Temp26.png


3. Spin boxes on time component doesn't work for me. What am I missing?
https://s14.postimg.org/enbpi2bm9/zzzzz_Temp25.png

642

(13 replies, posted in General)

DriveSoft wrote:

AD1408
I did an approximate algorithm of password meter, you can change the script to fix it.


Thanks Dmitry...


I wanted to display strength label1 value on another form. I put the following under onCellClick event:

Form1.Label2.Caption := StrengthMeter(frmDetails.edPassword.Text)+ inttostr(Form1.tgPaswords.dbitemid);

but nearest i could get it display Very weak1, Very weak2 etc. Your kind correction would be appreciated.


Edit:
------
Looks like I was thinking wrong way around. Adding a another procedure below for form1  worked OK beside frmDetails :

procedure Form1_edMainPassword_OnChange (Sender: string);
begin
  Form1.Label1.Caption := StrengthMeter(Form1.edMainPassword.Text);
end;

Once again, thank you very much Dmitry.....

643

(13 replies, posted in General)

Hi Dmitry,


I was testing password meter and applied to my project and it works fine.


One thing I noticed, while password meter identifies the password   12245678910121  as very strong, online tester my1login identifies it as medium.

https://s14.postimg.org/ub9gzk1gh/zzzzz_Temp22.png

644

(13 replies, posted in General)

Hi Dmitry,


Great stuff................
Thank you very much................

645

(13 replies, posted in General)

Hi Math,


Thanks for the nice little script. It's very useful indeed for various tasks. As you have pointed out it's too basic for the purposes and will give misleading feedback to user.


What Dmitry showed as example is great as it checks various aspects of a password and provides good amount of information:

Do you mean something like this:
https://www.my1login.com/resources/pass … ngth-test/

.
Hopefully Dmitry can give us something like the one above, "my1login..." one.


I found some discussions and examples on password meter but they are beyond me. I'm putting some of those links as they may be a quick reference for advanced coders here:
http://www.delphigroups.info/2/d6/413956.html
http://www.delphipraxis.net/1052507-post36.html
http://www.delphipraxis.net/1052459-post30.html
http://forums.unigui.com/index.php?/top … wordmeter/

646

(13 replies, posted in General)

Do you mean something like this:
https://www.my1login.com/resources/pass … ngth-test/

Yes, that looks good.


Or you want just to see how many characters in a password?

Characters is just something extra next to meter but this feature is not that important.

647

(2 replies, posted in General)

Hi Derek,


Thank you very much......................
It works now !!!
Appreciated...........

648

(2 replies, posted in General)

I couldn't work out a script for the following:
https://s4.postimg.org/dwvjhzrnx/zzzzz_Temp21.png


Each records has different URL. Clicking on "Go to Website" button should open the website on user default browser.


Tried this but didn't work:

procedure Form1_Button5_OnClick (Sender: string; var Cancel: boolean);
begin
  openURL('edMainURL');
end;

649

(9 replies, posted in General)

DriveSoft wrote:

AD1408
Check it

        Form1.GridEmployees.Cells[0,i] :=Form1.GridEmployees.Cells[0,i]+#10#13;
        Form1.GridEmployees.Cells[1,i] :=Form1.GridEmployees.Cells[1,i]+#10#13;
        Form1.GridEmployees.Cells[2,i] := Form1.GridEmployees.Cells[2,i]+#10#13;

Thanks Dmitry.....
The above didn't work for me. Most likely I'm doing something wrong.
Please see the attached sample project.

650

(13 replies, posted in General)

Could anybody code a password strength meter?

Strength meter would be active. While typing characters into password field meter would be updated, showing how many bits and characters.


Also I add check for re-enter script to button save as follows:

procedure frmDetails_btnSAVE_OnClick (Sender: string; var Cancel: boolean);
begin
    if not (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
    begin
      ShowMessage('Please re-enter password correctly.');
      frmDetails.edReEnterPassw.Clear;
    end;
end;

It checks  OK but it results in blocking save?


edit:
---------------
I used the following for checking re-enter with additional save button. It seems to be working OK but not sure if it's a correct approach.

procedure frmDetails_btnSAVE_OnClick (Sender: string; var Cancel: boolean);
begin
onClick1;
onClick2;
end;

procedure onClick1;
begin
    if not (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
    begin
      ShowMessage('Please re-enter password correctly.');
      frmDetails.edReEnterPassw.Clear;
    end;
end;

procedure onClick2;
begin
    if (frmDetails.edPassword.Text = frmDetails.edReEnterPassw.Text) then
    begin
      frmDetails.btnSAVEfake.Click;
    end;
end;

Please see the attached sample project: