Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 3 Jahren, 3 Monaten
Letzter Beitrag:
vor 3 Jahren, 3 Monaten
Beteiligte Autoren:
Curtis, Alexandre Leclerc, Joris

[WD19]How to Create Dynamic Widgets / Internal Windows? [SOLVED]

Startbeitrag von Curtis am 17.03.2015 14:55

I would like to be able to dynamically create and add widgets(internal windows) to my dashboard control. For example, say I have an unknown number of students. I would like a widget for each student that displays their grade in the class. How would I dynamically create 12 widgets for the 12 students in Class 1?

I'm trying to figure this out, but so far I'm coming up blank.


Re: [WD19]How to Create Dynamic Widgets / Internal Windows?

Hi Curtis,

I have tried this myself but i think it is not possible now. Maybe in Windev 21?
AFAIK widgets can not be dynamically created.



von Joris - am 17.03.2015 16:12

Re: [WD19]How to Create Dynamic Widgets / Internal Windows?

Internal windows are the only thing that can be used as widgets, correct?

The only thing I can think of is to have a large number of pre-made internal windows with default layouts/controls. For example, if the maximum number of students is 25 I would have to create 25 separate default internal windows. Then I can add and modify what I need.

Not sure what the overhead cost for that might be.

von Curtis - am 17.03.2015 16:18

Re: [WD19]How to Create Dynamic Widgets / Internal Windows?

Hi Curtis,

You only need one Internal Window to do that. You create an internal Window, call it "IW_Student" for example. Then you simply add 12 or 24 widgets based on the exact same internal window with DashAddWidget(). You simply pass in parameter the student ID or data and you are in business and keep the indices returned by the DashAddWidget() proc to make reference to the good widget.

Look at the dashboard control's help to know how to code that.

Best regards,
Alexandre Leclerc

von Alexandre Leclerc - am 17.03.2015 17:07

Re: [WD19]How to Create Dynamic Widgets / Internal Windows?

Did not know you can do that Alexandre. That should work well for my purposes. Thanks!

von Curtis - am 17.03.2015 17:17
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.