851

(1 replies, posted in Script)

Hello Dimitri

My base about birds created with MVD1.45 is now growing big and takes some time to be loaded.
I would like make wait users before they take the door and have a beer.

Do you think I could use a Progress Bar (there is no such a composent with MVD)
By the way of a script as ProgressBar := TProgressBar.Create (nil); ?

I'd place it on a Splash Screen and it could be activated by event SplashOnShow.
But I'm a lot annoyed by the coding.

Could you have an example of code for this function ?
Thanks in advance

Jean B.

852

(5 replies, posted in General)

Hello Dimitri

Thanks pour MVB 1.45

New contributions are very usefull.

New version after new version, MVB becomes a wonderful jewel.

A proposition for next :

In module Script, could you add number of ligne in front of lines.
To avoid placing the mouse on the good one (I know error message indicates the bad line) but my eyes are getting old.
Thanks again for 1.45

Jean B.

853

(4 replies, posted in Script)

Hello Dimitri

A question about DBImage component.
How would you do to clear picture showed in a DBImage ?

I've tried many codes :

myForm.DBImage1.Picture.Bitmap.Assign(nil);    or
myForm.DBImage1.Picture.Graphic:= Nil;              or
myForm. DBImage1.Picture.Graphic.Empty;

Each time, I get error message saying : 'Could not convert variant of type|Null] into type [Integer]
Obviously, a transtypage problem.

If I try this :

myForm.DBImage.Picture := nil;
Well, Okay, picture has flew away but the component DBImage also with it.

Thanks for your answer !
Jean B.

854

(12 replies, posted in Script)

Hello Dimitri,

I've downloaded MVD 1.44 and it works fine

Thanks again

Jean B.

855

(12 replies, posted in Script)

Hello Dimitri

By being inspired from your script :

Form1.TableGrid1.Cell[0, 0].Color:= clRed;
Form1.TableGrid1.Cell[0, 0].TextColor:= clGreen;

In a column titled, how could I get a different color by theme.
Example :

I have a column titled Gender (for books)
I would have all books Fantasy colored blue, all Thrillers red, all novels green, and so on.
By the way, how to have all the different row colored by theme ?

I don't guess what will be the script.
All I have tried give up error.

Thanks for you help

Yann Yvinec

856

(1 replies, posted in General)

Hello Dimitri

Did you find why it's impossible to modify font and color of a text in a TextBox by way of Object Inspector ou a script ?

This is my script :

procedure Affichage_Edit12_OnChange (Sender: string);
begin
   Affichage.Edit12.Font.Style := fsItalic;
   Affichage.Edit12.Font.Color := $00000033;
end;

Thanks for your help.

Yann Yvinec

857

(1 replies, posted in General)

Hello Dimitri,

To develop MVB

2 new functions which could be good for our application :

- Using a Treeview (or a DBTreeview) : MVB would have a professionnal aspect. I used it with Delphi 7 but this one don't work under Windows 8 et I haven't the courage to write again this application under RAD XE3 (... whatever ...)

- Add 2 news properties at TableGrid to get differents colors for alterned rows. (cause event OnDrawCell is not actived in MVB). But I guess that MVB don't use native TableGrid from RAD XE3. It feels Bergsoft's component NextDBGrid, isn't it ?

Well, if not, too bad, and long life to MVB !

Yann Yvinec

858

(5 replies, posted in Script)

alsu

Hello

If a dialog with 2 informations (User and Password) is enough for your need, take a walk into the forum (I don't remember the theme),
Dimitri has posted an exemple of a Login dialog with table Employees.

Jean B.

859

(14 replies, posted in General)

andreas.malmqvist76

Well, as said Dimitri (DriveSoft), using efficiently Comboboxes needs at least two tables in  order to create relationships between those two  tables (or more if need be).

As example, I've set up an application about birds with three tables : 1) Birds, 2) Order and 3) Family.
Those 3 tables have relationships and there , the comboboxes have a sense and utility.

With 2 dropdown comboboxes, (Order and Family), I can populate the main tables (Birds) with the contents of two others (table Order and table Family). When dropdown comboboxes are opened, I can see the différents values for each tables and I can pick every one from the comboboxes.

As Comboboxes have two fields (ForeignKey and Fieldname -  (ForeignKey is in fact the name of the table you want reach) - you can easily populate  these ones with values of each of second tables.

Was I clear in my explications ?

Jean B.

860

(14 replies, posted in General)

andreas.malmqvist76

Hello

Do you mean your problem stands in that Combobox doesn't show differents values (555, cvbc) in the dropdown list from where could select a value ?

Jean B.

861

(4 replies, posted in Script)

Hello

Made with Delphi XE3

Jean B.

862

(2 replies, posted in General)

Hello

Thanks for this script

Very interesting for my project about birds.

My goal is to show picture of the bird when mouse is moving or entering on the name of the bird in the grid

Jean B.

863

(2 replies, posted in General)

Hello The Engineer

I've got such an error message (and many times !!).

Every time, when I used Save button, In action [Save Record], I forgot  choosing the fields
concerned by this action.

Or in the form, fields concerned by Save action were not filled (no TableName and no FieldName).
Obviously, Save button could not save fields unknown for it.

Is it the case for you ?

Good luck

Jean B.

864

(3 replies, posted in General)

Hello

Thanks for your example. It works fine.

But one question : why not using directly  OnDrawCell as with Delphi ou RAD XE3 ?

Thanks again

Jean B.

865

(3 replies, posted in General)

Hello

It seems that with TableGrid, method OnDrawColumnCell is not enabled.
(I tried to get something like TableGrid1.OnDrawColumnCell.Enabled := True
and I get an error message).

Should it be possible to allow this in next version of MVD ?
We could put color on alterned rows, get an alignment for title et son on ...

Thanks

Jean B.

866

(6 replies, posted in General)

Hello

I've translated MVD Help in French.
If ever you find any mistake in this translation, please email me  and I'll fix it immédiately.
Thanks

Yann Yvinec

867

(5 replies, posted in General)

Hello

Sorry for this missing file
I've made a "tricky code" to resolve my case
(Get the value of a combox, hide this one, make visible the Edit component to get the value of the CB)
Th'at works wel but i get an error message 'List index out of bound (0) or (1)'

Jean B.

868

(5 replies, posted in General)

HEllo

Thanks for your answer.
In fact my way loading comboboxes works fine.
What I want : to transform the value entered in combox as a string in order to save it in my main database,
Something as this :

ComboBox1.Items.Add(Query1.Fields[1].AsString); (in my case there is no Query used).
See joined file

Thanks

869

(5 replies, posted in General)

Hello Dimitri

I'm making a test on my VDB about birds.

To reduce many forms I have, I'm testing 2 comboboxes populated
with 2 text files (orders and families ) through a script :

Affichage.ComboBox1.Items.LoadFromFile(Chemin + 'Ordres_Oiseaux.txt');
Affichage.ComboBox2.Items.LoadFromFile(Chemin + 'Familles_Oiseaux.txt');

That's works fine (the loadings).

But I would  Combobox.Text be filled by the user's choice from file loaded (i.e Orders).
I'm not very good with Items.Index.
Have you any ideas about the way to succeed ?
And how to save those selection through a Save button (directly or with a script) ?

Another error message : Compilation tells me "no such columns" .
So I'v declared in my main table called Oiseaux those 2 fields : Order and Family.
It occurs when I want modify a record already saved

Thanks for your help

Best regards

Jean B.

870

(6 replies, posted in General)

Hello Domitri

Thanks for your answer

In fact, I was using the same SQL instruction like yours, but I didn't think to refresh my grid.
Thanks for that

Best regards

Jean B.

871

(6 replies, posted in General)

Hello Dimitri

If I would place a nice button (with icone and picture) to remplace the gray basic button  of MVD, what would be the real syntax to place behind.

For example, in MVB, after selecting the record to delete, the button DELETE --> (Action) DELETE RECORD -> SELECT THE GRID -> , what would be the delphi syntax to perform the same result ?

Thanks for answer




Great Thanks
Jean B.

872

(1 replies, posted in General)

Hello Dimitri

When I want to change caracteristics of a text in an EditBox by the way of Object Inspector, there are no changes.
But in a previous post, you said it was  a bug.

Well, I said : 'Let's pass behind et let's use a script ' (this is my script) :

procedure Affichage_Edit2_OnChange (Sender: string);
Var s : String;
begin
   s := Affichage.Edit2.Text;
   s := UpperCase(s);
   Affichage.Edit2.Font.Style := fsBold;
   Affichage.Edit2.Font.Color := $00000033;

The first instruction  works fine (UpperCase).
The two last have no effect on the text.

I'm using VDB 1.42

Any explication about this ?

Thanks for your help.

Sincere Thanks

Jean B

873

(2 replies, posted in General)

Thanks Dimitri

I'm looking PhoneBook Example to understand this principle

Thanks again !

Jean B.

874

(2 replies, posted in General)

Hello Dimitri

When creating New tables, question is asked : "the table is a dictionnary".

Do you mean that a dictionnary table is a hash table as Delphi knows it, that's to say  hash table is optimized for lookups (best speed) ?

Please, could you create a video lesson about interaction between  tables (as in PhoneBooke Example). It is not so obvious.
For example, i'm creating an application for my comics. I would use comboxboxes for drawers, scenarists, coloristes, gender, state ... and son on. Tables Drawers, Scenarists, Genders, State ... have been created. It's a lot difficult to understand how associate those tables with the main table (called Comics) so that comboboxes show various drawers, scenarists, gender ....

Thanks for your help and greats for MVD

Jean B.

875

(1 replies, posted in General)

Hello to All !

When I use Counter Component, I get this error (see file joined)
So I've looked PhoneBook exemple to see how using it
Ofcourse, I've initialized its value from beginning at 0 (zero)
In a script behind a button, I've repeated this value.
No matter, allways this !!?@@@}} .... error

No need to declare a var.
It seems that transtypage INT to String does not go right
Am I wrong ?

Thanks for your help

Jean B.