Simple_Application_Framework_for_VCL[9]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zblue78 的 blog

summary

now our application looks much better because of using a developer express navbar control as the navigation control.

here is the link to the source code of the application written in delphi. you need the developer express expressnavbar control installed in your environment to be able to compile and run this application.

add developer express bars library

now it is time to replace the old-fashioned standard menu and toolbar system with another one. because of our actions layer, this is not a big problem. whichever library we decide to choose, we only need to modify the main form. here we will show how to migrate to the developer express expressbars library.

we are using vcl actions technology, so before migrating to another menu and toolbar system, you have to check whether it supports vcl actions technology. expressbars support's vcl actions.

drop a tdxbarmanager component on the main form. use the tdxbarconverter to replace the standard main menu with the expressbars main menu.

we will use the tdxbarlistitem class for navigation between modules. we need to modify the registermodules method

[delphi]

procedure tfrmmain.registermodules;
var 
  i: integer;
    …
begin 
    …
  //go through all modules 
  for i := 0 to moduleinfomanager.count - 1 do 
  begin 
    …
    // add the item into the bar's list item 
    barlistitem.items.add(moduleinfomanager[i].name)
  end;
end;

here is the code for the barlistitemclick event

[delphi]

procedure tfrmmain.barlistitemclick(sender: tobject);
begin 
  // show the module 
  showmodule(moduleinfomanager.items[barlistitem.itemindex]);
end;

本文关键:Simple_Application_Framework_for_VCL
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top