zoukankan      html  css  js  c++  java
  • C# Dock Style 设置

    Assuming there are two panels in a winform, show like below.

    Panel1 Panel2

    Panel1.dock is left.

    Panel2.dock is fill.

    Right now, add a status bar at the bottom of this winform. Howerver, the status bar will located at the bottom under panel2, rahter than the bottom of this winform. Here is the sample.

    x10sctmp

    If choose the status bar on design of IDE, set it send to the back(置底), that the view of the panel should be like below:

    x10sctmp0

    The reason for this senario is that the order of control being added to theri parent. For more details, please check the designer.cs of the winform.

    For the first case:

    this.controls.add(statusbar);
    this.controls.add(panel1);
    this.controls.add(panel2);
    For the second case:
    this.controls.add(panel1);
    this.controls.add(panel2);
    this.controls.add(statusbar);
    Indeed, the operation of “send to back” and “bring to front” just change the order of being added into parent container, in this case, parent container is the winform.
    So if the dock style setting of the controls is not fit for your design, please consider change the order of this controls.
  • 相关阅读:
    GORM模型(Model)创建
    GORM高级查询
    LogAgent
    安装kafka
    go读取日志tailf
    bubble清单
    go操作kafka
    GORM模型删除
    Vue 父子组件间的传值
    列表和表格
  • 原文地址:https://www.cnblogs.com/rogerroddick/p/2939706.html
Copyright © 2011-2022 走看看