Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 9 Monaten
Letzter Beitrag:
vor 2 Jahren, 9 Monaten
Beteiligte Autoren:
Tor-Bjarne, DarrenF

1 widget on 2 different dashboards

Startbeitrag von Tor-Bjarne am 12.09.2015 15:52


I have a couple of dashboards that uses the same internal window (widget) that works fine until I send an event.

I would expect both internal windows to react on the same event, but it seems only one of them do?
(First loaded internal window gets the event?)

If I Remove the internal window from one dashboard, the second intrenal window reacts on the event (as it`s alone)

I thought I could do a controlclone(IW_1,IW_2), dashaddwidget(DASH1,"iw_2","Some text") but no, the controlclone tells me that IW_1 do not exist (it do however in my project, it`s just not been loaded anywhere yet)?

Any tips on how to solve this without making 2 identical windows would be nice ;)




I don't completely understand what you're trying to achieve Tor-Bjarne, but maybe you could try using "planes"?


von DarrenF - am 15.09.2015 04:32
Hi DarrenF,

I also use planes, but an example of what I`m doing is this:

Win_Main..Plane=1 is a Dashboard, Win_Main..plane=2 is also a dashboard.

Now I can "Draw" a table object internal window on the dashboard on plane 1, on the dasboard on plane 2 I can "Draw" a "Form Update" internal window.

Or I can draw both on the same dashboard,this way I let the user decide how the user interface should look.

I have a class that lets "Internal-window" objects subscribe on different events, the table object post an event on a new selection, the "Form update" (objects if there are several) receives the "change" event and redraws their controls.

I`n my current app I have a Flights Table on one dashboard(plane1) this objects sends message "Flight changed" to all "objects that needs to know", I got a ULD_Pr_Flight Widget, a AWB_Pr_Flight widget, a ULD_Built widget (That updates the FLight widget) and so forth that can be placed anywhere - resized and shaped as the customer like.


von Tor-Bjarne - am 15.09.2015 15:22

Forgot to mention that my project is WinDev 20

After a time consuming debug, I think I found a (the) bug or unsuspected behavior regarding IW_ Widgets.

In 2 different internal windows (Widgets on dashboards) I use the same name on a edit control for example EDT_Flight.

In my 2 compleatly different windows there are also different selection procedures to select Flights but some places in the code there is typical a EDT_Fligh = mesh.wMes.sMessage (or something)

I have to prefix the edit control with the internal window/widget name or WinDev is using the the "same-name" control in a internal window that is not suppose to do anything for the moment, and code that checks the value is also broken (since it "can" take the value from my other Internal-window/Widget`s control)

in other words:

Procedure xx (in IW_Win1)

IW_Win.EDT_Fligh = mesh.wMes.sMessage (or something) //Works as espected

EDT_Fligh = mesh.wMes.sMessage (or something) // Can fail if no prefix in procedure yy IW_Win2)

Procedure yy (in IW_Win2)

iw_win2.EDT_Fligh = mesh.wMes.sMessage (or something) //Works as espected

EDT_Fligh = mesh.wMes.sMessage (or something) // Can fail if no prefix in procedure xx IW_Win1)

Just wanted to let everybody that codes widgets/dashboards to know.
This is also true for listboxes.


von Tor-Bjarne - am 15.09.2015 15:40
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.