426

(2 replies, posted in General)

Hi EHW,


Thank you very much..............
Truly appreciated....................

427

(2 replies, posted in General)

I have tried to apply Dmitry's striped tGrid row coloring script to specified single column coloring but I couldn't get it work?
In this case I just want to color specified single column cells without striped coloring.
With the following script I'm getting "List index out of bounds" error.

procedure FORM2_TableGrid2_OnChange (Sender: string);
var iRow, c, q, iCol: integer;
begin
  c := FORM2.TableGrid2.RowCount - 1;
  q := FORM2.TableGrid2.Columns.Count - 1;
  for iCol := 0 to c do
  for iRow := 0 to q do
  begin
  if iCol mod 2 = 0 then FORM2.TableGrid2.Cell[iCol,iRow].Color := clYellow;
  end;
end;

Is it possible to get date field displayed without data when there is non entered (not checked)?
Unless I'm doing something wrong, when is not checked and entered data to date field it displayes current date.

procedure Form2_TableGrid1_OnCellClick (Sender: string; ACol, ARow: Integer);
var s: string;
begin
  s := SQLExecute('SELECT birthDate FROM People WHERE id='+Form2.TableGrid1.sqlValue);
    if s <> '' then Form2.dtpMainPeopleDOB.Date := SQLDateTimeToDateTime (s)
    else Form2.dtpMainPeopleDOB.Checked := False;

    //if Form2.dtpMainPeopleDOB.Checked = False then Form2.dtpMainPeopleDOB.sqlDate := ('');
end;

In an attempt to clear date value from it my script line which is commented out as it doesn't work..

428

(3 replies, posted in General)

DriveSoft wrote:

Hello.


It's look like I should to make own Delphi smile


It's possible to make plugins but without visual components.


Great!!!
I'm hoping and praying that we'll have it soon.
I understand not having visual components for plugin libraries.

429

(3 replies, posted in General)

Hi Dmitry,


Let me first say I love MVD. It's a great IDE for beginners and slow learners like myself.


Is there any plan to add plugin etc feature to MVD so that we can buy and use Delphi VCL libraries from component developers?
I'm getting desperate to have treeview and rtf editor.

430

(10 replies, posted in General)

Hi Derek,


the point was that the lag to load frmsplash is noticeably REDUCED  by moving the splash screen call from the form1_onshow procedure and placing it between the 'begin' and 'end' when the application loads.

Agreed.
Thank you very much for the alternative........................
Truly appreciated...................................................


It's standard MVD that when you leave the label captions blank, they do not show by default when editing the frmsplash form.  Just click on the relevant label in the....

Thank you very much for the info.......

431

(10 replies, posted in General)

Hi Derek,


Thank you very much for the sample project contains your solution.........


Unless, I'm getting something wrong there is still some time laps between double click to launch MVD app .exe and splash screen to appear. Perhaps it's waiting for MVD app to initialize?


Also I couldn't make counter and message labels on frmSplash visible for editing etc purposes?

432

(10 replies, posted in General)

Great stuff EHW !!!


Thank you very much.......................
Truly appreciated..................................


Perhaps Dmitry can add a ready made splash form component that we can use in not so distant future hopefully. Splash form that's in line of your solution.
♦ Splash form that starts immediately without the wait of app load
♦ And it closes once MVD app loaded (form1)

433

(10 replies, posted in General)

Hi EHW,


Thank you very much............................


Now start of the splash as wanted.
I guess it's not possible doing it without timer; splash closes when main app form1 loaded as different users will have different loading time depending on their system.

434

(10 replies, posted in General)

Hi JB,


Thank you very much.......


I used your code as follows (added missing var for iTimer)

Var Timer, Timer2 : TTimer;
    iTimer : integer;

procedure OnTimer2 (Sender: TObject);       //  On initialise le splash
begin
iTimer := iTimer + 1;
if iTimer > 2 then                     //    The 5 seconds are gone
  begin
    Timer2.Enabled := False;          //  We unload the Timer2
    frmSplash.Close;                     // We close Splash form
    Timer2.Free;                      //  Essentiel : on libère le Timer2
    //Waiting.Show;
    Application.ProcessMessages;      //  To avoid Windows to freeze the application
  end;
end;


begin
  Timer2 := TTimer.Create(nil);             // Pour l'activation de l'écran d'accueil
  Timer2.OnTimer  := @OnTimer2;             // event procedure
  Timer2.Interval := 1000;                             // 1 sec
  Timer2.Enabled  := True;                //  Le Timer est déclenché
  frmSplash.ShowModal;                      //  On affiche l'écran d'accueil
end.

I couldn't understand what Waiting.Show; does refers to?


However, I still see windows progress circle showing for noticeable time though.
What I like to do is splash form shows after as soon as double clicking on MVD app and closes once the Form1 is loaded. In order to achieve this, splash form needs to run straight away, as it's own form without MVD app initialized I'm thinking?

435

(10 replies, posted in General)

As far as I understand I can have a splash for displayed once FORM1 is loaded for specified time.


Is it possible to launch splash form just after application .exe double clicked withou the wait of Form1 loading?
This will be very useful when we have slow loading MVD app.


Here is a slower loading sample project with many forms etc., if needed:

436

(9 replies, posted in General)

Thank you very much for your kind help Dmitry.......................


I tried to add couple of lines to have cursor turns into handpoint only when there is a link item within a cell

procedure FORM2_TableGrid3_OnMouseEnter (Sender: string);
var ACol, ARow: Integer;
begin
if (Pos('http',  Form2.TableGrid3.Cells[ACol,ARow]) =1) or (Pos('www',  Form2.TableGrid3.Cells[ACol,ARow]) =1)  then
   begin
   FORM2.TableGrid3.Columns[1].Cursor := crHandPoint;
   end;

if Pos('@', Form2.TableGrid3.Cells[ACol,ARow]) > 0 then
   begin
   FORM2.TableGrid3.Columns[2].Cursor := crHandPoint;
   end;
end;

However, it didn't work as usual

437

(9 replies, posted in General)

Thank you very much Dmitry................


Taking it bit further, I wanted apply couple more features to clickable linked URLs and Emails
♦ Coloring linked columns: Works fine
♦ Underlining linked items: Not working
♦ Changing mouse to crHandPoint when mouse moves over a linked item: Not working.


I tried the following but I think I couldn't get the syntax right except coloring part:

procedure FORM2_TableGrid3_OnChange (Sender: string); // Selected whole column Text Coloring
var  vc, vi: integer;
begin
  vc := FORM2.TableGrid3.rowcount-1;
  for vi := 0 to vc do
    begin
      FORM2.TableGrid3.cell[1,vi].textcolor := clblue;
      FORM2.TableGrid3.cell[2,vi].textcolor := clblue;
      FORM2.TableGrid3.cell[1,vi].FontStyle := Underlined;
    end;
end;

procedure FORM2_TableGrid3_OnMouseEnter (Sender: string);
var  vc, vi: integer;
begin
  vc := FORM2.TableGrid3.rowcount-1;
  for vi := 0 to vc do
    begin
      FORM2.TableGrid3.cell[1,vi].Cursor := crHandPoint;
      FORM2.TableGrid3.cell[2,vi].Cursor := crHandPoint;
    end;
end;

438

(9 replies, posted in General)

DriveSoft wrote:

Link may be without 'www', better to use 'http' to check link.


Good point.
However, user may just type www.myvisualdatabase.com instead of c/p or type full url http://myvisualdatabase.com/index.html
Plus there are urls with https such as https://www.google.com


If possible best solution would be to include all 3 by making the following line to work:

if Pos('https' or 'http' or 'www', Form2.TableGrid3.Cells[ACol,ARow]) > 0 then

439

(9 replies, posted in General)

Hi Dmitry,


Thank you very much..................
Truly appreciated........................


After trial and error (replacing @ with www for a URL), I think, I managed to have URL and Email links on separate columns:

procedure FORM2_TableGrid3_OnCellClick (Sender: string; ACol, ARow: Integer);
begin
  if ACol=1 then
  if Pos('www', Form2.TableGrid3.Cells[ACol,ARow]) > 0 then
     OpenUrl(Form2.TableGrid3.Cells[ACol,ARow]);

  if ACol=2 then
  if Pos('@', Form2.TableGrid3.Cells[ACol,ARow]) > 0 then
     OpenUrl('mailto:'+Form2.TableGrid3.Cells[ACol,ARow])
end;

If the above is incorrect, please correct.

440

(9 replies, posted in General)

Is it possible to have clickable link column/s in tGrid for URL /  Email addresses?

441

(2 replies, posted in General)

Still couldn't come up with a solution for the issue on post #1 of this topic.


Basically cannot add data to editable tGrid.


Is this a bug for editable tGrid or I'm missing something?

442

(1 replies, posted in General)

Hi Dmitry and all the rest of MVD fun guys,


What's the best practice to develop faster launching MVD app?
Which are slowing down most?

♦ Using more forms.
♦ Using more tables.
♦ Using a lot of panels and groupbox components on forms.
♦ Using a lot of fields.
♦ A lot of script / code (thousands of lines) if so how to improve script. Does having too many comment and blank lines effects the speed
♦ I can imagine using graphics would slow down, such as image buttons and image form headers. Which image format better beside file size, where images used.
♦ Any other speed killer items.


Where top priorities should be given in order of importance?

443

(2 replies, posted in General)

I cannot get tGrids accepting data when adding new record using Form1 "Add" button - People record in this case. They are part of People details.
Filling data on editable tGrid first row, then pressing enter key on keyboard or clicking other parts of tGrid doesn't commit record. First row stays greyed. Please see frmPeople in sample project attached below.
However, when show record action used (editing saved people record) same tGrids accept data.
My one cell brain just couldn't come up with solution.


Editable tGrids may also need clearing them after save of the frmPeople?

444

(9 replies, posted in General)

DriveSoft wrote:

Editable tablegrid is independent, there is no way to change it by script.


My intention was not to change actual tablegrid. Rather duplicate keyboard and mouse actions associated with the tablegrid such as on the image below.

https://s1.postimg.org/1cdrqs6cdr/zzzzz_Temp70.png


Adding, editing, deleting and saving tablegrid actions are available via keyboard or mouse clicks.
Delete action works with button already.

I'm still not clear why we cannot add, edit and save via buttons too like with delete button.
Add and Edit buttons are not so important, in fact it's more convenient via keyboard an mouse. However, SAVE button is needed in certain circumstances (as explained on previous posts on this topic)

445

(5 replies, posted in General)

Hi Derek,


Thank you very much...............
Truly appreciated....................


I was trying to use it as a bleeper when browsing the records. Your line of the code below did the job:

procedure Form2_TableGrid1_OnClick (Sender: string); 
begin
  myscroll;
  if Form2.combobox2.itemindex > -1 then beep(500,300); 
end;

In fact you did more than what I was trying to ask. I'm not complaining. I'm sure additional stuff you have added will become handy in other projects. Thanks again............

446

(5 replies, posted in General)

Hi Derek,


Thanks for the beep sample for manixs.


I have tried to apply it to a field such as:

procedure Form2_TableGrid1_OnClick (Sender: string); 
begin
if not (Form2.ComboBox2.Text = '') then Beep(600,1000);
end;

but couldn't get it working?


What I wanted to do is, if combobox2 contains a value, it'd beep on display of the record, if empty no beep.
Would you be so kind to correct my attempt please?

447

(4 replies, posted in General)

Hi EHW,


Thank you VERY MUCH..................................
TRULY appreciated.........................................
Your kindness goes long way for me as always.......

448

(4 replies, posted in General)

DriveSoft wrote:

You forgot change TableGrid in the settings of button "btnSuppFakeEdit", change it to TableGrid3


Thanks a lot Dmitry.....
Done. Now, browsing suppliers records works.


It seems, I'm missing something else.
After clicking on "Manage Suppliers" button on Form1, I get an error message:
"Cannot focus a disabled or invisible window."

449

(4 replies, posted in General)

I wanted to apply Derek's method of getting details without SQL.
It works fine with People tab on Form2 but I couldn't get it working with Suppliers tab on  form2?


Please see the attached sample project below:

450

(9 replies, posted in General)

DriveSoft wrote:
AD1408 wrote:

Hi Dmitry,

Could you possibly let me have the code to replicate pressing keyboard ENTER key please.
In this case, I like to use it for save grid button.

Please explain the question on more detail.


As far as I could understand editable grid commits (saves) new data entered on first row:
- When enter key on keyboard pressed
- When clicked on any saved row

This is fine with editable grid on a form without a "form save button". When editable grid placed on a form with "Form Save Button" I like to place a SAVE GRID button for the editable grid. Clicking on SAVE GRID saves the data entered on first row of the editable grid only by adding save/enter code to SAVE GRID button.

procedure frmPeople_btnSaveGrid_OnClick (Sender: string; var Cancel: boolean);
begin
  frmPeople.TableGrid1.??????;
end;

https://s1.postimg.org/19hb3nruof/zzzzz_Temp69.png