type  
      PComponentState   =   ^TComponentState;  
   
  procedure   TForm1.FormShow(Sender:   TObject);  
  var  
      I:   Integer;  
  begin  
      Include(PComponentState(@DBNavigator1.ComponentState)^,   csLoading);  
      DBNavigator1.Width   :=   24;  
      DBNavigator1.Height   :=   0;  
      for   I   :=   0   to   DBNavigator1.ComponentCount   -   1   do  
          if   DBNavigator1.Components[I]   is   TNavButton   then  
          begin  
              TNavButton(DBNavigator1.Components[I]).Left   :=   0;  
              TNavButton(DBNavigator1.Components[I]).Top   :=   DBNavigator1.Height;  
              DBNavigator1.Height   :=   DBNavigator1.Height   +   24;  
          end;  
      Exclude(PComponentState(@DBNavigator1.ComponentState)^,   csLoading);  
  end;
posted on 2008-09-25 17:17  yxbsmx  阅读(242)  评论(0编辑  收藏  举报