Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
19
Erster Beitrag:
vor 1 Jahr, 2 Monaten
Letzter Beitrag:
vor 1 Jahr, 2 Monaten
Beteiligte Autoren:
StanleyBarnett, Al, DerekT, Tomas Petersen, DarrenF, JP, Fabrice Harari, Arie, GuenterP

Methods & Events of an Edit Control

Startbeitrag von StanleyBarnett am 22.05.2016 10:02

Hi,

Windev 21...

How do I access the events and methods of an edit control such as double-click, interactive change, right-click and 30 or so more as shown in the attached screenshot of VFP's offerings.

I'm new to WinDev and am looking for "how do I do this in WinDev" when most of these events and methods are missing...

Thanks, Stanley

[attachment 2005 Picture0001.png]

Antworten:

Re: Methods & Events of an Edit Control

Hello Stanlyn

Right click on the control, click on "Code".
The code edit window will open.
In the bottom status bar of the code window click on either the icons or the "..." to display the available events.
Every control has this option and displays events appropriate to the control type.

Regards
Al

von Al - am 22.05.2016 10:15

Re: Methods & Events of an Edit Control

Hi Al,

That looks much better and is much more complete that the code that comes up in the code window. I was scared that there were only the initializing and click events for a button as that was all the code in the buttons code window.

A couple more related questions...

When clicking the ... as you suggested, I get a large list and inside the list is a name surrounded by parens such as (WM_MouseMove). Would that be the event that I would fire thru code to trigger it? And how do I call it? I know properties are set with a control.property=something. I did not see any way to call the objects events or methods, so how is that done?

Thanks,
Stanley

von StanleyBarnett - am 22.05.2016 10:32

Re: Methods & Events of an Edit Control

Hello Stanley

Tick the option(s) you want to trap and the event(s) will be added in the code window for you to enter code into.

Regards
Al

von Al - am 22.05.2016 10:34

Re: Methods & Events of an Edit Control

Yes, I see that...

Any thoughts on the other questions from my last message on this thread?

Thanks, Stanley

von StanleyBarnett - am 22.05.2016 10:46

Re: Methods & Events of an Edit Control

In addition to Al's answer.
If the predefined list hasn't still enough events you can also set an event by yourself using the Event() function on that control to manage EVERY event.
http://doc.windev.com/en-US/?3015011

von Arie - am 22.05.2016 10:52

Re: Methods & Events of an Edit Control

OK, lets try this again...

After carefully reviewing the list that "..." brings up, I see it is missing the event I am looking for.

I have code in the "Whenever modifying" EDT_PriceBT event that I was trying to fire from another control. I see no way of firing it? How do I do it and what is the method's name for "Whenever modifying" as this is what is displayed in the code editor?

Here is what I'm trying to do... When selecting an item in the combo box I need it to run the code in the EDT_PriceBT's "Whenever modifying" event... Hope that helps explain it...

Thanks, Stanley

von StanleyBarnett - am 22.05.2016 10:58

Re: Methods & Events of an Edit Control

Stanlyn

Type in 'ExecuteProcess(Button1,trt'

On typing 'trt' a whole list of actions that cabe be performed on the target control will be displayed.
In the above instance then 'trtChange' would be your friend.

von DerekT - am 22.05.2016 11:05

Re: Methods & Events of an Edit Control

Thanks DerekT, that done it...

Is it fair to say that the gui show no reference to this? I could not find it anywhere. Instead, its buried and one would have top know 1. what to look for and 2. where to look?

Thanks again, Stanley

von StanleyBarnett - am 22.05.2016 11:22

Re: Methods & Events of an Edit Control

Valid criticism I'm afraid.
WD contains hundreds of Functions which in turn can contain myriad associated processes.
I doubt that anyone (with the possible exception of Fabrice) knows them all.
Generally speaking most creep in without any particular fanfare with only the 'big ticket' items being included in '900 new' announcements at each release.

I have been using WD since v5.5 and still find functionality I was unaware of - quite often by reading answers on here from people who have made the discovery.
However as can be seen from the responses to your latest batch of questions there are frequently a number of different solutions to a given problem.

Tough call for anyone starting out on v21 but generally you will always get an answer (solution) on here if the question is well formatted.

Al answered my very first question on here back in the day and I believe Arie and others have been around for just as long.

von DerekT - am 22.05.2016 12:02

Re: Methods & Events of an Edit Control

Hi Derek,

I appreciate the praise, but I'm afraid it is unwarranted... Even I continue to discover things very often in our tools. That is one of the reasons I'm on the french and US forum nearly every day... Always something new to learn

My main advantage is that after 23 years, I think wlanguage, so I generally can find what I need much faster, but that's about it. :-)

Best regards

von Fabrice Harari - am 22.05.2016 13:43

Re: Methods & Events of an Edit Control

OK, anyone knows what the 'trt' prefix means and where in the documents that shows what all the prefixes represents.

Thanks, Stanley

von StanleyBarnett - am 23.05.2016 00:41

Re: Methods & Events of an Edit Control

Hello Stanley

"trt" is French for something ?
The various trt options will display when you are typing in the Executeprocess(mycontrol,
They will appear after you type the comma, or when you start to type the letters trt. If they disappear, backspace and type in the comma again.

You can find them all in the help. Use the local help, not the web help, as it is much easier to navigate in the early days. You can set the location of the help file in Tools > General options of Windev > Help

In the local help file, use the "ABC" - index option and enter "trt" to see the list.

Regards
Al

von Al - am 23.05.2016 00:53

Re: Methods & Events of an Edit Control

Hi Al,

What other unknown prefix types are used? I'm just finished day #1 and ran into this trt thing and wondering what's next...

It would be extremely helpful if we could associate trt with something. This would be a good time for some French speaking developers explain this since it is in French.

Thanks, Stanley

von StanleyBarnett - am 23.05.2016 01:27

Re: Methods & Events of an Edit Control

Hi, there are hundreds of other pre-fixes in the W-Language. In fact PC Soft makes using W-Language easier with these prefixes because after some time you know that certain commands / functions are starting with a ceratin character string and so start typing an unknown command and ho and belo! the editor will present a list of those commands .. just choose the right one!

von GuenterP - am 23.05.2016 05:35

Re: Methods & Events of an Edit Control

Derek,

You don't even need to type "trt.." - just type the comma and the intellisense list of processes appears

von JP - am 23.05.2016 07:42

Re: Methods & Events of an Edit Control

Hi,

I believe "trt" comes from the french "traitement" (process).

To get to know more about WX language feel free to investigate the Help (both online & in your tool) & last but not least some points of interest are clarified in the examples & the training booklet which are included as well.

Cheers & welcome,

Tomas

von Tomas Petersen - am 23.05.2016 12:19

Re: Methods & Events of an Edit Control

Hi,

The 'trt...' is 1 of many constants.

Here's a list of constants, including the new ones introduced @ V21:

http://help.windev.com/en-US/?3013075&name=Various_WD_constants

von DarrenF - am 23.05.2016 13:27

Re: Methods & Events of an Edit Control

Thanks Darren!

Stanley

von StanleyBarnett - am 24.05.2016 00:50
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.