I'm having the same problem.
I'm doing this in MVD and not Delphi.
Thank you
226 2018-08-11 19:58:57
Re: [SOLVED] PopupMenu on Button Left Click (13 replies, posted in General)
227 2018-08-11 19:30:06
Topic: [SOLVED] Figure To Words Function (British Format) (20 replies, posted in General)
procedure Form1_Edit1onChange(Sender:TObject);
begin
Form1.Edit2.Text:=ToWords(Form1.Edit1.value);
end;
When I enter 123 or 1234 in Edit1 I get
123:One hundred twenty three
1234:One thousand two hundred thirty four respectively
But what I was expecting to get is
123: One hundred and twenty three
1234: One thousand two hundred and thirty four respectively.
Click on link to get the British Format example
http://myvisualdatabase.com/forum/viewt … 225#p26225
228 2018-08-11 17:33:33
Re: [SOLVED] PopupMenu on Button Left Click (13 replies, posted in General)
Thanks jean.brezhonek
I tried using the above code earlier today before my post but did not work.
Error: Undeclared identity: 'Mouse'
229 2018-08-11 14:50:09
Topic: [SOLVED] PopupMenu on Button Left Click (13 replies, posted in General)
Hello Dmitry,
I'm having a little challenge in making the popupMenu on a button appear on just a 'Left Click'.
The popupMenu only appears on 'Right Click'
How do I make this work on just a 'Left Click' on the button
procedure Form1_OnShow (Sender: string; Action: string);
var
PopupMenu: TPopupMenu;
MyItem: TMenuItem;
begin
PopupMenu := TPopupMenu.Create(Form1);
MyItem := TMenuItem.Create (PopupMenu);
MyItem.Caption := 'Add';
MyItem.OnClick := @popupMenuOnClick;
PopupMenu.Items.Add(MyItem);
MyItem := TMenuItem.Create (PopupMenu);
MyItem.Caption := 'Edit';
MyItem.OnClick := @popupMenuOnClick;
PopupMenu.Items.Add(MyItem);
MyItem := TMenuItem.Create (PopupMenu);
MyItem.Caption := 'Delete';
MyItem.OnClick := @popupMenuOnClick;
PopupMenu.Items.Add(MyItem);
Form1.btnPopup.PopupMenu := PopupMenu;
end;
procedure popupMenuOnClick (Sender: string);
begin
//
end;
begin
end.
Find the example project attached
Thank you.
230 2018-08-10 10:21:47
Re: What to implement first? (187 replies, posted in General)
Wow
MVD all the way
I really love this project.
231 2018-08-10 10:02:05
Re: [SOLVED] Copy Row As New Record (5 replies, posted in General)
Thank you Dmitry
I am really grateful.
MVD, the best Visual DBase App
It is perfect and simple.
Dmitry used only two lines of code to do that. Excellent.
procedure frmEmployee_bSaveAsNew_OnClick (Sender: TObject; var Cancel: boolean);
begin
frmEmployee.bSave.dbGeneralTableId:=-1;
frmEmployee.bSave.Click;
end;
Download from the link provided by Dmitry above
Check other examples derek provided from link below
http://myvisualdatabase.com/forum/viewt … 146#p26146
232 2018-08-10 06:50:28
Re: What to implement first? (187 replies, posted in General)
Hi Dmitry,
FEATURE REQUEST
Please would it be possible to add "Copy Row As New Record" to the button actions in the next release?
Thank you.
233 2018-08-10 06:16:25
Topic: [SOLVED] Copy Row As New Record (5 replies, posted in General)
Hello Dmitry and MVD friends
Please can this feature be implemented?
I wish the next update will have the 'Copy As New Record' added to the Action for the button.
Please how do I implement this manually using a button.
When I click on the 'COPY AS NEW', it should copy the selected row as a new record which I can edit before saving.
Thank you.
234 2018-08-09 08:42:52
Re: Menu (9 replies, posted in Script)
SIMPLIFIED MENU CREATION
You can also follow this post to create your menus with ease using functions and procedures
235 2018-08-08 12:34:02
Re: What to implement first? (187 replies, posted in General)
FEATURE REQUEST
User double click a component.
The user is taken to the script page where the component event is written
User should be able to switch between events so that user can type his code
The following also come in handy
1. Menu Control
2. Timer Control
3. Status Bar Control
Thank you
236 2018-08-07 16:56:26
Re: [SOLVED] Dynamic Menu - Procedure/Function (8 replies, posted in General)
Wow
You are great Dmitry
You have really made things easy for database system making
It worked perfectly. My dynamic menu is fully ready with submenus and images.
Thanks
I LOVE MVD
237 2018-08-06 08:47:35
Re: [SOLVED] Dynamic Menu - Procedure/Function (8 replies, posted in General)
There is no problem with creating the Menu items from a function or procedure.
THE NEW TOPIC IS HOW TO ADD A DYNAMIC OnClick Event to the procedure from a string
var
MainMenu1 : TMenuItem;
Procedure CreateMenuItem (Const Menu : TMenuItem ; Caption : String; DynamicEvent );
var MenuItem : TMenuItem;
Begin
MenuItem := TMenuItem.Create(Form1.Menu);
MenuItem.Caption := Caption;
MenuItem.OnClick := @DynamicEvent; /////////////////I want to add dynamic event here from string
Form1.Menu.Items.Add(MenuItem);
End;
procedure Form1_OnShow (Sender: string; Action: string); // event OnShow
Begin
CreateMenuItem(MainMenu1,'Users');//Create mainMenu
End;
begin
end.
Eg. if I call the procedure
CreateMenuItem(MainMenu1,'Users',Event1_onClick);
i want it to create
a menu item 'Users'
an onClick event on Event1_onClick
238 2018-08-05 22:34:34
Re: [SOLVED] Dynamic Menu - Procedure/Function (8 replies, posted in General)
Solved
This is what I was looking for
var
MainMenu1 : TMenuItem;
Procedure CreateMenuItem (Const Menu : TMenuItem ; Caption : String );
var MenuItem : TMenuItem;
Begin
MenuItem := TMenuItem.Create(Form1.Menu);
MenuItem.Caption := Caption;
Form1.Menu.Items.Add(MenuItem);
End;
procedure Form1_OnShow (Sender: string; Action: string); // event OnShow
Begin
CreateMenuItem(MainMenu1,'Files');//Create mainMenu
End;
begin
end.
239 2018-08-05 17:35:20
Re: [SOLVED] Dynamic Menu - Procedure/Function (8 replies, posted in General)
Thanks jean.brezhonek
I have check the example but what I wanted was to create a function which I can call to create the menu.
I am able to create the menu as you have done but I want it to be simplified by using a function which I can call to create the menu.
Thank you once again
240 2018-08-05 13:33:09
Topic: [SOLVED] Dynamic Menu - Procedure/Function (8 replies, posted in General)
Solved
var
MainMenu1 : TMenuItem;
Procedure CreateMenuItem (Const Menu : TMenuItem ; Caption : String );
var MenuItem : TMenuItem;
Begin
MenuItem := TMenuItem.Create(Form1.Menu);
MenuItem.Caption := Caption;
Form1.Menu.Items.Add(MenuItem);
End;
procedure Form1_OnShow (Sender: string; Action: string); // event OnShow
Begin
CreateMenuItem(MainMenu1,'Users');//Create mainMenu
CreateMenuItem(MainMenu1,'Pages');//Create mainMenu
CreateMenuItem(MainMenu1,'Reports');//Create mainMenu
End;
begin
end.
241 2018-07-31 13:57:26
Re: Feature Request (Double Click Component to Add/Edit its procedure) (2 replies, posted in General)
Thank you for your nice gesture. I really appreciate your work.
-----------------
I LUV MVD
242 2018-07-31 12:10:03
Topic: [SOLVED] TagbleGrid, Pagination, Footer and Offset (62 replies, posted in General)
http://myvisualdatabase.com/forum/viewtopic.php?id=4447
NB: MVD 4.6 beta version is required for this to work.
Check it out
procedure Form1_OnShow (Sender: TObject; Action: string);
begin
Form1.cbPages.ItemIndex:=4;////this will show the first 100 records
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.bSearch.Click;
end;
procedure Form1_bSearch_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbOffSet := 0;
end;
procedure Form1_bNext_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbOffSet := Form1.GridEmployees.dbOffSet + StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbUpdate;
end;
procedure Form1_bPrev_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbOffSet := Form1.GridEmployees.dbOffSet - StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
if Form1.GridEmployees.dbOffSet < 0 then Form1.GridEmployees.dbOffSet := 0;
Form1.GridEmployees.dbUpdate;
end;
procedure Form1_cbPages_OnChange(Sender: TObject; var Cancel: boolean);
begin
if (Form1.cbPages.ItemIndex =0) then
begin
Form1.cbPages.ItemIndex := 1;
end;
end;
begin
//Form1.GridEmployees.dbLimit := 500;
end.
Download example here
http://myvisualdatabase.com/forum/viewtopic.php?id=4447
243 2018-07-31 12:02:38
Re: [SOLVED] TableGrid with Pagination and Offset (11 replies, posted in SQL queries)
This is the preview
244 2018-07-31 11:59:20
Re: [SOLVED] TableGrid with Pagination and Offset (11 replies, posted in SQL queries)
With the help of Dmitry
I have been able to add the pagination offset in a combo box so you can select the number of rows to display in the table Grid.
I'm really enjoying MVD.
Check this out
procedure Form1_OnShow (Sender: TObject; Action: string);
begin
Form1.cbPages.ItemIndex:=4;////this will show the first 100 records
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.bSearch.Click;
end;
procedure Form1_bSearch_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbOffSet := 0;
end;
procedure Form1_bNext_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbOffSet := Form1.GridEmployees.dbOffSet + StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbUpdate;
end;
procedure Form1_bPrev_OnClick (Sender: TObject; var Cancel: boolean);
begin
Form1.GridEmployees.dbOffSet := Form1.GridEmployees.dbOffSet - StrToInt((Form1.cbPages.Text));
Form1.GridEmployees.dbLimit := StrToInt((Form1.cbPages.Text));
if Form1.GridEmployees.dbOffSet < 0 then Form1.GridEmployees.dbOffSet := 0;
Form1.GridEmployees.dbUpdate;
end;
procedure Form1_cbPages_OnChange(Sender: TObject; var Cancel: boolean);
begin
if (Form1.cbPages.ItemIndex =0) then
begin
Form1.cbPages.ItemIndex := 1;
end;
end;
begin
//Form1.GridEmployees.dbLimit := 500;
end.
245 2018-07-31 11:06:25
Topic: Feature Request (Double Click Component to Add/Edit its procedure) (2 replies, posted in General)
I really love MVD and wish this feature could be added.
FEATURE
User double click a component.
The user is taken to the script page where the component event is written
User should be able to switch between events so that user can type his code.
Please can you add Feature Request page to the forum where we can request and suggest features?
Thank you.
-----------------------------------------
thezimguy
246 2018-07-31 09:45:35
Re: [SOLVED] TableGrid with Pagination and Offset (11 replies, posted in SQL queries)
Thank you so much boss
I'm really grateful
I will try it and communicate back
You are the best
Dmitry/MVD
It works like magic. You have really made it easy to load more data in the tablegrid
Guys check this new feature out. You will really love it
Don't forget to download the 4.6 beta] version Dmitry uploaded
247 2018-07-29 11:43:37
Topic: [SOLVED] TableGrid with Pagination and Offset (11 replies, posted in SQL queries)
Please how do I create pagination for tableGrid using buttons as next, previous, 1,2,3..., end etc
So that on form load. First 500 records will be loaded and when I click the next button the next 500 records will load without the first 500