Перейти из форума на сайт.

НовостиФайловые архивы
ПоискАктивные темыТоп лист
ПравилаКто в on-line?
Вход Забыли пароль? Первый раз на этом сайте? Регистрация
Компьютерный форум Ru.Board » Компьютеры » Прикладное программирование » Использование DevExpress

Модерирует : ShIvADeSt

ShIvADeSt (29-01-2007 03:17): идем сюда
http://forum.ru-board.com/topic.cgi?forum=33&topic=7918
 Версия для печати • ПодписатьсяДобавить в закладки
На первую страницук этому сообщениюк последнему сообщению

   

Alex47



Member
Редактировать | Профиль | Сообщение | Цитировать | Сообщить модератору

>We have a dxBarManager and have created a "MainMenu" with it. We also have
>some popup menus linked via the PopupLinks property. On the Form, we cannot
>select the dxBarManager's "Window" menu, because the drop down list for the
>Form.WindowMenu property is empty.
>How do we make this work?
 
It's manual but is pretty easy.
 
* Create a TdxListItem or a TdxInPlaceSubItem
* Create the click handler
procedure TForm1.WinBarButtonClick( Sender: TObject );
begin
ShowWindow( TForm( ( Sender as TdxBarButton ).Data ).Handle,
SW_RESTORE );
TForm( ( Sender as TdxBarButton ).Data ).BringToFront;
end;
{In prinicple, only one is needed but with MDI applications, I found
that only calling both of these have proper effect}
 
* create a procedure to add your forms to the list
MenuItem: TdxBarButton;;
begin
MenuItem:= TdxBarButton.Create( dxBarManager1 );
MenuItem.Caption := YourForm.Caption;
MenuItem.Data := YourForm;
MenuItem.OnClick := WinBarButtonClick;
SubItem.ItemLinks.Add.Item := MenuItem;
end;
 
* To delete the form from the list, you must write a procedure to find
the right button and then just call BatButton.Free.
---
Rajko Bogdanovic - DX Squad
 
THANKS. Before receiving your post, I experimented with using a
dxBarMRUList. Everything seems to work OK. I am using the following code
to identify and activate the child window selected from the MRUList.
 
var
    szTemp : String;
    I : Integer;
begin
    szTemp :=
AnsiLowerCase(ExtractFileName(dxBarMRUList.Items.Strings[dxBarMRUList.ItemIn
dex]));
 
with MyForm do
    for I := MDIChildCount - 1 downto 0 do begin
        if AnsiLowerCase(MDIChildren[I].Caption) = szTemp then begin
            MDIChildren[I].BringToFront;
            BREAK;
            end;
        end;
end;
 
This allows me to extend the above code to persist the MRU List, and if an
item is selected from the list, but is currently not in the MDIChildren
array, then I can call the "open" action to open the file.
 

Всего записей: 366 | Зарегистр. 20-03-2003 | Отправлено: 16:21 05-12-2006 | Исправлено: Alex47, 16:23 05-12-2006
   

На первую страницук этому сообщениюк последнему сообщению

Компьютерный форум Ru.Board » Компьютеры » Прикладное программирование » Использование DevExpress
ShIvADeSt (29-01-2007 03:17): идем сюда
http://forum.ru-board.com/topic.cgi?forum=33&topic=7918


Реклама на форуме Ru.Board.

Powered by Ikonboard "v2.1.7b" © 2000 Ikonboard.com
Modified by Ru.B0ard
© Ru.B0ard 2000-2024

BitCoin: 1NGG1chHtUvrtEqjeerQCKDMUi6S6CG4iC

Рейтинг.ru