⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fs_iextctrlsrtti.pas

📁 报表源码 FastReport 3 is new generation of the report generators components. It consists of report engin
💻 PAS
📖 第 1 页 / 共 2 页
字号:
  begin
    if MethodName = 'SELECTNEXTPAGE' then
      TPageControl(Instance).SelectNextPage(Params[0])
    else if MethodName = 'PAGES.GET' then
      Result := Integer(TPageControl(Instance).Pages[Params[0]])
  end
  else if ClassType = TStatusPanels then
  begin
    if MethodName = 'ADD' then
      Result := Integer(TStatusPanels(Instance).Add)
    else if MethodName = 'ITEMS.GET' then
      Result := Integer(TStatusPanels(Instance).Items[Params[0]])
  end
  else if ClassType = TTreeNode then
  begin
    if MethodName = 'DELETE' then
      TTreeNode(Instance).Delete
    else if MethodName = 'EDITTEXT' then
      Result := TTreeNode(Instance).EditText
  end
  else if ClassType = TTreeNodes then
  begin
    if MethodName = 'ADD' then
      Result := Integer(TTreeNodes(Instance).Add(TTreeNode(Integer(Params[0])),
        Params[1]))
    else if MethodName = 'ADDCHILD' then
      Result := Integer(TTreeNodes(Instance).AddChild(TTreeNode(Integer(Params[0])),
        Params[1]))
    else if MethodName = 'BEGINUPDATE' then
      TTreeNodes(Instance).BeginUpdate
    else if MethodName = 'CLEAR' then
      TTreeNodes(Instance).Clear
    else if MethodName = 'DELETE' then
      TTreeNodes(Instance).Delete(TTreeNode(Integer(Params[0])))
    else if MethodName = 'ENDUPDATE' then
      TTreeNodes(Instance).EndUpdate
    else if MethodName = 'ITEM.GET' then
      Result := Integer(TTreeNodes(Instance).Item[Params[0]])
  end
  else if ClassType = TTreeView then
  begin
    if MethodName = 'FULLCOLLAPSE' then
      TTreeView(Instance).FullCollapse
    else if MethodName = 'FULLEXPAND' then
      TTreeView(Instance).FullExpand
  end
  else if ClassType = TListColumns then
  begin
    if MethodName = 'ADD' then
      Result := Integer(TListColumns(Instance).Add)
    else if MethodName = 'ITEMS.GET' then
      Result := Integer(TListColumns(Instance).Items[Params[0]])
  end
  else if ClassType = TListItem then
  begin
    if MethodName = 'DELETE' then
      TListItem(Instance).Delete
{$IFNDEF CLX}
    else if MethodName = 'EDITCAPTION' then
      Result := TListItem(Instance).EditCaption
{$ENDIF}
  end
  else if ClassType = TListItems then
  begin
    if MethodName = 'ADD' then
      Result := Integer(TListItems(Instance).Add)
    else if MethodName = 'BEGINUPDATE' then
      TListItems(Instance).BeginUpdate
    else if MethodName = 'CLEAR' then
      TListItems(Instance).Clear
    else if MethodName = 'DELETE' then
      TListItems(Instance).Delete(Params[0])
    else if MethodName = 'ENDUPDATE' then
      TListItems(Instance).EndUpdate
    else if MethodName = 'ITEM.GET' then
      Result := Integer(TListItems(Instance).Item[Params[0]])
  end
end;

function TFunctions.GetProp(Instance: TObject; ClassType: TClass;
  const PropName: String): Variant;
begin
  Result := 0;

  if ClassType = TPageControl then
  begin
    if PropName = 'PAGECOUNT' then
      Result := TPageControl(Instance).PageCount
  end
  else if ClassType = TTabSheet then
  begin
    if PropName = 'PAGECONTROL' then
      Result := Integer(TTabSheet(Instance).PageControl)
  end
  else if ClassType = TTreeNode then
  begin
    if PropName = 'COUNT' then
      Result := TTreeNode(Instance).Count
    else if PropName = 'DATA' then
      Result := Integer(TTreeNode(Instance).Data)
    else if PropName = 'IMAGEINDEX' then
      Result := TTreeNode(Instance).ImageIndex
    else if PropName = 'SELECTEDINDEX' then
      Result := TTreeNode(Instance).SelectedIndex
{$IFNDEF CLX}
    else if PropName = 'STATEINDEX' then
      Result := TTreeNode(Instance).StateIndex
{$ENDIF}
    else if PropName = 'TEXT' then
      Result := TTreeNode(Instance).Text
  end
  else if ClassType = TTreeNodes then
  begin
    if PropName = 'COUNT' then
      Result := TTreeNodes(Instance).Count
  end
  else if ClassType = TTreeView then
  begin
    if PropName = 'ITEMS' then
      Result := Integer(TTreeView(Instance).Items)
    else if PropName = 'SELECTED' then
      Result := Integer(TTreeView(Instance).Selected)
    else if PropName = 'TOPITEM' then
      Result := Integer(TTreeView(Instance).TopItem)
  end
  else if ClassType = TListItem then
  begin
    if PropName = 'CAPTION' then
      Result := TListItem(Instance).Caption
    else if PropName = 'CHECKED' then
      Result := TListItem(Instance).Checked
    else if PropName = 'DATA' then
      Result := Integer(TListItem(Instance).Data)
    else if PropName = 'IMAGEINDEX' then
      Result := TListItem(Instance).ImageIndex
    else if PropName = 'SELECTED' then
      Result := TListItem(Instance).Selected
{$IFNDEF CLX}
    else if PropName = 'STATEINDEX' then
      Result := TListItem(Instance).StateIndex
{$ENDIF}
    else if PropName = 'SUBITEMS' then
      Result := Integer(TListItem(Instance).SubItems)
  end
  else if ClassType = TListItems then
  begin
    if PropName = 'COUNT' then
      Result := TListItems(Instance).Count
  end
end;

procedure TFunctions.SetProp(Instance: TObject; ClassType: TClass;
  const PropName: String; Value: Variant);
begin
  if ClassType = TTabSheet then
  begin
    if PropName = 'PAGECONTROL' then
      TTabSheet(Instance).PageControl := TPageControl(Integer(Value))
  end
  else if ClassType = TTreeNode then
  begin
    if PropName = 'DATA' then
      TTreeNode(Instance).Data := Pointer(Integer(Value))
    else if PropName = 'IMAGEINDEX' then
      TTreeNode(Instance).ImageIndex := Value
    else if PropName = 'SELECTEDINDEX' then
      TTreeNode(Instance).SelectedIndex := Value
{$IFNDEF CLX}
    else if PropName = 'STATEINDEX' then
      TTreeNode(Instance).StateIndex := Value
{$ENDIF}
    else if PropName = 'TEXT' then
      TTreeNode(Instance).Text := Value
  end
  else if ClassType = TTreeView then
  begin
    if PropName = 'SELECTED' then
      TTreeView(Instance).Selected := TTreeNode(Integer(Value))
    else if PropName = 'TOPITEM' then
      TTreeView(Instance).TopItem := TTreeNode(Integer(Value))
  end
  else if ClassType = TListItem then
  begin
    if PropName = 'CAPTION' then
      TListItem(Instance).Caption := Value
    else if PropName = 'CHECKED' then
      TListItem(Instance).Checked := Value
    else if PropName = 'DATA' then
      TListItem(Instance).Data := Pointer(Integer(Value))
    else if PropName = 'IMAGEINDEX' then
      TListItem(Instance).ImageIndex := Value
    else if PropName = 'SELECTED' then
      TListItem(Instance).Selected := Value
{$IFNDEF CLX}
    else if PropName = 'STATEINDEX' then
      TListItem(Instance).StateIndex := Value
{$ENDIF}
    else if PropName = 'SUBITEMS' then
      TListItem(Instance).SubItems := TStrings(Integer(Value))
  end
end;


initialization
  Functions := TFunctions.Create;

finalization
  Functions.Free;


end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -