AdvancedHMI Software

General Category => Feature Request => Topic started by: xulan on February 19, 2019, 03:30:35 AM

Title: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: xulan on February 19, 2019, 03:30:35 AM
I am using the RecipeSaveButton to save one recipe, if i press the RecipeSaveButton, the keypad will be popup, then I can set the name of the recipe and hit "Enter" key to save it.

Is it possible to create one flag which I can use for another form.
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Archie on February 19, 2019, 08:04:35 AM
Can you explain what you mean by "one flag"?
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: xulan on February 20, 2019, 01:20:50 AM
The flag could be bool value which could be readable in another form, I want to know the setting is done.

But this "Enter" button belongs to the popup keypad, I just want to use this event to trigger a bit in another form.
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Archie on February 20, 2019, 02:51:01 PM
Attached is a modified RecipeSaveButton that has a RecipeSaved event

- Download the attached file
- Open your solution in Visual Studio
- In Solution Explorer, expand down AdvancedHMIControls project
- Right click the RecipeControls folder and select Add->Existing
- Browse to the file downloaded
- Rebuild solution

Your RecipeSaveButton will now fire the RecipeSaved event
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Rizwan on February 24, 2019, 09:56:52 PM
I have tried it but same as before ,
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Archie on February 24, 2019, 10:10:01 PM
I just tried it out with a MsgBox in the event handler and it worked for me by popping up the box when I saved a recipe

Code: [Select]
    Private Sub RecipeSaveButton1_RecipeSaved(sender As Object, e As EventArgs) Handles RecipeSaveButton1.RecipeSaved
        MsgBox("Recipe Saved!")
    End Sub
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Rizwan on February 24, 2019, 10:11:43 PM
Thanks ... :)
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Archie on February 24, 2019, 10:19:30 PM
Did you make the modification or try it from the latest beta version? I noticed it actually wasn't in 2.99y beta 24
Title: Re: How to create an Event after hit the ENTER KEY in the RecipeSaveButton
Post by: Rizwan on February 24, 2019, 10:31:00 PM
Yes we are working in beta version 3.99
...
Dear , do you have Recipe Delete or rename solution ?
and
while we saved recipe with same name, can we popup message box to ask before  overwrite ?