Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 6 Jahren, 1 Monat
Letzter Beitrag:
vor 6 Jahren, 1 Monat
Beteiligte Autoren:
Luis C, Arie, Yogi Yang.pcs.crosspost, Steve Hodgman.pcs.crosspost, Yogi Yang, The Windevver.pcs.crosspost, Harry S, Massimo Caroccia, Hugo Tessaro

Add a new control in a window programatically

Startbeitrag von Yogi Yang.pcs.crosspost am 13.07.2012 13:05

I want to add a new control to window at runtime. The control that I want add, does not exist in the window.

I know one can clone a control using the function "ControlClone".

For example I have a window in which there are 3 controls as follows:
- Static Control
- Edit Control
- Image Control

Now at runtime I want to create 3 instances of Button Control and one instance Chart Control in code.

How can I do this?


Yogi Yang

Message forwarded from pcsoft.us.windev


afaik you can not.
The only way is to add a dummy control to the window. Make it invisible and/or put it outside the visible part of the window. And use this control for cloning.

von Arie - am 13.07.2012 13:18
You can create your control at designtime in another Plane (like 2 or 3) and change the plane of this controls at runtime:

myButton..Plane = 0

von Massimo Caroccia - am 13.07.2012 16:53
You can add a generic control (and make it invisible) and use the function ControlClone(EDT_invisible, "EDT_New", 10, 10)
{"EDT_New"}..visible = True

von Hugo Tessaro - am 13.07.2012 17:20
What!? no answer!

Is my question hard to understand or is such a functionality not possible in WD?

Message forwarded from pcsoft.us.windev

von Yogi Yang.pcs.crosspost - am 17.07.2012 14:51
Hey ..... Yogi Yang,

Temper your reaction. (What!? No answer!)

What kind of person are you ?
We try to help you so be nice to people..

Regards Harry

von Harry S - am 17.07.2012 20:03
Yogi Yang.pcs.crosspost
What!? no answer!

Is my question hard to understand or is such a functionality not possible in WD?

Message forwarded from pcsoft.us.windev

Sorry Yogi what part of NO you don't understand? (He he he sorry guys I couldn't resist)

You got your answers use any of the 3 provided to you... they all work .

von Luis C - am 17.07.2012 21:02
Yogi's post is a cross-post.
Our answers did not make it (yet??) to the official windev forum, so I guess Yogi hasn;t noticed our answers.

von Arie - am 17.07.2012 21:07
Ups ... My bad Sorry Yogi

von Luis C - am 17.07.2012 21:45
Sorry all folks who answered my query in this forum.

Actually I don't frequent to this forum so it just sliped my mind that someone must have answered my query here.

Sorry for my behaviour.

Yogi Yang

von Yogi Yang - am 18.07.2012 05:34
Hi Yogi,
please check that other forum here


Message forwarded from pcsoft.us.windev

von The Windevver.pcs.crosspost - am 18.07.2012 06:48
On 18/07/2012 1:51 AM, Yogi Yang wrote:> What!? no answer!
> Is my question hard to understand or is such a functionality not
possible in WD?

No and No.

The thing I like about WD is that they seem to have thought of most of
the things that are needed, even if the function name or method of
getting there is not the way you might think about it.

You have already given the answer, you just need to plan ahead a bit.....
Come on, think about it.

Any control you like can be included in a window. You can change
properties in the program to make a control visible, active etc...

So, go back to your question and think about the answer that is already
in front of you.
Good Luck and let me know if you are still not sure how to proceed.

Message forwarded from pcsoft.us.windev

von Steve Hodgman.pcs.crosspost - am 18.07.2012 06:49
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.