设置相关的TabSheet的enable:=false;

解决方案 »

  1.   

    sorry,直接设置PageControl1的enabled
      

  2.   

    那样的话,整个Page不都不可编辑了吗?
      

  3.   

    我晕~~你自己看你的题目:
    如果我想让当我点到其中一页时,其他页为不可选状态,该怎么实现?谢谢了!
             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    拜托,你这和enabled:=false有什么不一样
    因为选择了之后,就不能再切换了!是么?有一首歌叫“only you”:)你这是“only one”
      

  4.   

    void __fastcall TForm1::PageControl1Changing(TObject *Sender,
          bool &AllowChange)
    {//在你需要的时候
    if(你的条件){
    AllowChange = false;//不能变
    }
    }
      

  5.   

    我倒……………………………………………………
    有这个属性:TabSheet1。Font
    你会用么
      

  6.   

    哎……等其他老大来解决吧
    你的分小弟不敢要了~~~:)sorry……
      

  7.   

    你既然不想让其他页可以编辑,干脆在选中你想要的页时候,让其他页不可见,不就行了
    设置TABVISIBLE 为false,呵呵,一个建议
      

  8.   

    我也倒……………………………………………………TabSheet1.Font.color也改不了标题(caption)的颜色呀!
      

  9.   

    to:seewell呵呵,要是那样可以的话,我就不用在这费劲的问人了!
      

  10.   

    我是想问,能不能改变除了当前页之外的其他页的Caption的颜色?
      

  11.   

    1.   TabSheet2.Enabled:=false 使TabSheet2中的控件不可用,
    2.   TabSheet2.TabVisible:=false 使TabSheet2不可见
    3.  改变Caption颜色,方法例:
      首先,设置PageControl1的OwnerDraw为True
      然后,处理PageControl1的OnDrawTab事件如下,自己完善:
    procedure TForm1.PageControl1DrawTab(Control: TCustomTabControl;
      TabIndex: Integer; const Rect: TRect; Active: Boolean);
    begin
      With PageControl1 Do
      Begin
        If Active Then Canvas.Font.Color := clRed
        Else Canvas.Font.Color := clBlue;
        Canvas.TextRect( Rect, Rect.Left+5, Rect.Top+5, Pages[TabIndex].Caption );
      End;
    end;