851

(4 replies, posted in General)

Hi Derek,


Thanks a lot for your kind help...


I have added clear fields after save, where 1 form used. Hopefully it's correct, it seems to be working fine.


Now, let see if anybody can do it by disabling combobox rather than hiding...


The attached sample project includes clear fields, otherwise same as Derek's version.

852

(4 replies, posted in General)

Hi Guys,


I'm trying conditionally enable / disable a combobox depending on which checkbox checked or not checked.
I used two checkboxes as a radio buttons (Thanks to Mathias). Radio buttons part works fine but not enable disable.
Combobox should be enabled only when one of the specific checkbox checked. All other instances it should be disabled.


I have tried Derek's method of showing/hiding groupbox/panel but encountered some issues, most likely my incorrect implementation. In any case, I'd like to do it with checkboxes using enable disable method.


Please see the attached sample project.

853

(3 replies, posted in General)

Hi Dmitry,


Thanks a lot....


procedure CalculateTotal;
begin
    if ValidFloat(frmExpenses.edExpenseUnitPrice.Text) and ValidInt(frmExpenses.edExpenseQty.Text) and ValidInt(frmExpenses.cbExpenseTaxRate.Text) then // check the correctness of the values
    begin
        frmExpenses.edExpenseNetPrice.Text := FloatToStr( StrToFloat(frmExpenses.edExpenseUnitPrice.Text) * StrToInt(frmExpenses.edExpenseQty.Text)); // calculate
        frmExpenses.edExpenseTaxAmt.Text := FloatToStr( StrToFloat(frmExpenses.edExpenseUnitPrice.Text) * StrToInt(frmExpenses.edExpenseQty.Text)) * StrToInt(cbExpenseTaxRate.Text / 100 );
        frmExpenses.edExpenseTotal.Text := FloatToStr( StrToFloat(frmExpenses.edExpenseUnitPrice.Text) * StrToInt(frmExpenses.edExpenseQty.Text)) * StrToInt(cbExpenseTaxRate.Text / 100 ) + StrToFloat(frmExpenses.edExpenseUnitPrice.Text);
    end else
    begin
        frmExpenses.edExpenseNetPrice.Text := '0';
        frmExpenses.edExpenseTaxAmt.Text := '0';
    end;
end;

procedure frmExpenses_edExpenseQty_OnChange (Sender: string);
begin
    CalculateTotal;
end;

procedure frmExpenses_edExpenseUnitPrice_OnChange (Sender: string);
begin
    CalculateTotal;
end;

procedure frmExpenses_cbExpenseTaxRate_OnChange (Sender: string);
begin
    CalculateTotal;
end;

I couldn't apply  your correction to above sample project script. Would you be so kind to apply it to above code please, so that when I enter Qty, Unit price and Tax Rate it automatically calculates Net Price, Tax Amt and Total Amt.

854

(3 replies, posted in General)

Hi Guys,


With guidence of a sample project, I managed to apply "Price" calculation but failed on "TaxAmt" and "Total" calc.


Please see the attached sample project:

855

(7 replies, posted in General)

Thanks a lot..........


Next question...
As users computer speed will differ, Instead of using fixed timer, is there a way to make splash screen disappear automatically once the application main window loaded?

856

(7 replies, posted in General)

DriveSoft wrote:

...Usually splash called form with image which showing until application is loading.

That's what I meant by splash.


https://s13.postimg.org/4zdox43ef/splexmple.jpg


I was hoping a kind soul may give me a script for application splash without win container.


I understand on form design stage we'll have form with win container most likely but when compile/run splash that hides/doesn't show win container.

857

(7 replies, posted in General)

Hi Guys,


Is it possible to use an image only splash without win container in MVD?

858

(3 replies, posted in General)

Hi pozidis,


If I'm not getting your question incorrectly, I asked similar question before. Thanks to guys here, I got a solution. See if it provides any solution for you too. Have a look the thread below:

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

859

(31 replies, posted in General)

Hi Dmitry,


Is there planned public release date of first MVD 3x?

860

(5 replies, posted in General)

Hi Dmitry and all other kind MVD funs,


It'd be a great MVD application template to have changing views (as in the sample project in previous posts) on resizeable window together with horizontal and vertical split bar.


I understand, it may take longer than quick fix time but this would benefit other current and future MVD users, so it wouldn't be just for me.

861

(187 replies, posted in General)

It's great news on-grid editing may be coming soon!!!


Treeview PLEASE............


I'm bit puzzled. Why there is no radio button component in MVD yet?


Some helpful tune ups would be handy:
1. On database tables tab, ability to move db table tGrids to arrange their order.
2. Multi select components settings where applicable. i.e.
http://prnt.sc/dac89d
btw, it seems anchoring missed on the above image window.


edit:
I forgot to mention having global user defaults settings in MVD.
For example, user may prefer to use certain type of (Properties) comboboxes, panels, tGrids and so on. If we have global components properties setting then we wouldn't have to set component properties again and again with each use, only when needed.

862

(4 replies, posted in General)

Hi Dmitry,


Sorry to bother you again. I wanted apply same pulling data as in customers tab tgCust_InvInfo on products tab but failed.


I have highlighted the issues on the project form1/customers tab.


Please see the attached sample project.


-----------------------------
edit:
Please ignore formating tGrid column numbers note on the sample project note above "tgCust_InvInfo" I've done it thanks to your script.
Just displaying customers that purchased selected products issue on Products tab.


edit2:
I thought I got  "tgCust_InvInfo" grid column values formatting right but it seems not. I used the following script:

//Formatting FORM1 tgCust_InvInfo columns and footer
procedure Form1_tgCust_InvInfo_OnChange (Sender: string);
var
    i,c: integer;
begin
    Form1.tgCust_InvInfo.BeginUpdate;

    c := Form1.tgCust_InvInfo.RowCount - 1;
    for i := 0 to c do
    begin
        Form1.tgCust_InvInfo.Cells[6, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[6, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[7, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[7, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[9, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[9, i].AsFloat);
        Form1.tgCust_InvInfo.Cells[10, i] := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Cell[10, i].AsFloat);
    end;

    Form1.tgCust_InvInfo.Columns[9].Footer.Caption := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Columns[9].Footer.FormulaValue);
    Form1.tgCust_InvInfo.Columns[10].Footer.Caption := FormatFloat('#,##0.00', Form1.tgCust_InvInfo.Columns[10].Footer.FormulaValue);

    Form1.tgCust_InvInfo.EndUpdate;
end;

Numbers are formatted OK but when clicking on add inv item button on inv header I get the following error:
" is not a valid floating point value.

863

(2 replies, posted in General)

Hi Guys,


I wanted to set auto focus on tgrid 1st record row rather than clicking on the record with:

procedure Form1_tgCustomersSearch_OnChange (Sender: string);
begin
Form1.tgCustomersSearch.SetFocus;
end;

but didn't work. What would be the correct script please?

864

(4 replies, posted in General)

Thank you VERY much Dmitry............

865

(4 replies, posted in General)

Hi Dmitry,


I was trying to put together something with scripts you have provided kindly. However, I stuck again. I think I'm getting relational linking wrong but I may be totally wrong. I have highlighted the issues on the project form1/customers tab.


Please see the attached sample project.


ps/. Sorry for the topic subject. I couldn't think of proper one.

866

(6 replies, posted in General)

Thank you for your reply EHV...


No worries... I'm grateful for your help to date...

867

(5 replies, posted in General)

Hi Dmitry,


Your fix works nicely. What would complete this project is to add sizeable window and splitter bars.


Changing views when window is sizeable, then adding horizontal splitter bar on vertical view and vertical splitter bar on horizontal view between panels 2 and 3 (tGridPanel and DetailsPanel).

868

(5 replies, posted in General)

Hi Dmitry,


Thank you so much.......................

869

(6 replies, posted in General)

Hi ehwagner,


I have added below details to project "frmDetails" too as reference.


RECURRING TASKS:
Tasks without due date and time are recurring. However, user may add due date/time then check "Task is recurring" checkbox, in this situation task becomes a recurring one and app ignores due date/time.
If possible, when "Task is recurring" checkbox not checked "Repeat - Recurring Task" group box could be disabled.


REMINDER - TASK ALARMS
If "Remaind at:" checkbox checked, application shows Message, Play specified sound file or both depending of user checking "Show Message" "Play Sound" check boxes  or both.  "Show Message" default is checked.

Alarms works in same way with normal and recurring tasks. Alarm date and time references to task due date/time for normal tasks and Recurring tasks to it's repeat  values in the  "Repeat - Recurring Task" group box.

Alarm is not active when task status selected as:
Not Started
On Hold
Cancelled

Reminder part is show/play alarm everyday at alarm time once the task due date/time is passed by 1 day. Reminder pop-up message may be displaying "Task is overdue ... days"


I'm not sure if the above is clear and correct... If it doesn't make any sense, you can define recurring tasks and alarms as you see fit. It's fine by me as I'm trying to have recurring tasks and some form of task alarm. Thank you for your kind help.


Please see the updated sample project

870

(5 replies, posted in General)

Hi Guys,


Is it possible to change window view from vertical to horizontal and back to vertical using same form?


https://s12.postimg.org/p8xjluqxp/views.png


Please see the attached sample project

871

(9 replies, posted in General)

Thanks a lot Dmitry for the highlight........


I was putting the script in wrong place. The following seems to be working OK:

//Coloring tgrid WHOLE row boolean and comboboxes
procedure Form1_tgSearch_OnChange (Sender: string);
var
   iRow ,c: integer;
   q, iCol: integer;
begin
     c := Form1.tgSearch.RowCount - 1;
     q := Form1.tgSearch.Columns.Count-1;
     for iRow := 0 to c do
        if Form1.tgSearch.Cells[2,iRow] = 'Yes' then
            for iCol := 0 to q do Form1.tgSearch.Cell[iCol,iRow].TextColor := $00959595;

        //Coloring tgrid WHOLE row TEXT according to combobox Repeat Every cbDetailsRepeat...
        for iRow := 0 to c do
        if Form1.tgSearch.Cells[3,iRow] = '3 Months' then
            for iCol := 0 to q do Form1.tgSearch.Cell[iCol,iRow].TextColor := clGreen;

        //Coloring tgrid WHOLE row TEXT according to combobox Month cbDetailsMonth
        for iRow := 0 to c do
        if Form1.tgSearch.Cells[4,iRow] = 'May' then
            for iCol := 0 to q do Form1.tgSearch.Cell[iCol,iRow].TextColor := clPurple;

        //Coloring tgrid WHOLE row TEXT according to combobox Day cbDetailsDay
        for iRow := 0 to c do
        if Form1.tgSearch.Cells[5,iRow] = 'Sunday' then
            for iCol := 0 to q do Form1.tgSearch.Cell[iCol,iRow].TextColor := clRed;

end;

872

(9 replies, posted in General)

Thanks a lot Dmitry.............


I wanted to apply conditional coloring of whole row / text of tGrid to combobox value by changing boolean value (yes, no) to available combobox value, It didn't work.

873

(2 replies, posted in General)

Hi Dmitry,


Thank you so much for the above and tGridrow text coloring......................

874

(2 replies, posted in General)

Hi Guys,


I'm trying to display multiple database fields on same form (read only) It was working before but in the process somewhere, I must have changed / deleted something and now it doesn't work. I cannot track it back.


Form1 / Customers tab / Add --> I add a new customer and save it all OK. However, When I click on newly added customer on tgCustomersSearch tGrid, I get error " Could not convert variant type (UnicodeString) into type (Boolean)" I couldn't see anything in boolean SQL statement.


Could somebody help please. Sample project is attached.

875

(9 replies, posted in General)

What about changing text color only of a whole row on tGrid please.........