Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > C++ Builder > mdi приложения


Автор: rthsobakas 22.12.2008, 17:28
Есть мди приложение. Там создаются дочерние формы. Есил дочерних форм много, то как узнать имя у произвольной?
Выложил фаил. Там КНОпка НАЖАТь при её нажатии последней дочерней форме(кэпшну) присваивается 'аааааааа'. Но если форму закрыть и ещё раз нажать на кнопку, то произойдет ошибка. Как сделать так чтобы можно было работать с произвольной формой?(то есть имя надо узнать как то)

Автор: NewDima 22.12.2008, 17:51
Цитата

Provides indexed access to all MDI child forms.

__property TForm* MDIChildren[int I] = {read=GetMDIChildren};

Description

Use MDIChildren to access a child form. 

I is the index of the child form to access. The order of MDI children changes as different MDI forms are activated. Initially, forms are listed in creation order, with new forms being added to the end of the array. Whenever an MDI child is activated, however, it moves to the front of the list. Thus, use I to index over all forms in the array, but not to refer to a specific form.

MDIChildren is meaningful only if the form is an MDI frame (that is, if the form’s FormStyle property is set to fsMDIForm).

читать справку не сложно, уверяю

Автор: Romikgy 22.12.2008, 19:19
Код

MainForm-> ActiveMDIChild->Caption="bbbbbb";


а так не лучше?

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)