社区
Delphi
帖子详情
有关于动态定SHAPE的问题??
guxingke
2004-09-17 09:26:22
我还想问一下各位,如果是一组动态的创建的parnel.和一组动态创建的SHAPE,二者创建的时间不是一定是同时的,当然panel肯定是在shape之前创建的,就是说要指明哪明某个SHAPE的PARENT是谁要怎么做?? 比如有若干个车间,每个车间有若干个机器,我用PANEL代表车间,用SHPAE代表机器,所以当我在车间一里增加机器时,那个shape的PARENT就要是车间一的对应的那个PANEL对吧
...全文
87
11
打赏
收藏
有关于动态定SHAPE的问题??
我还想问一下各位,如果是一组动态的创建的parnel.和一组动态创建的SHAPE,二者创建的时间不是一定是同时的,当然panel肯定是在shape之前创建的,就是说要指明哪明某个SHAPE的PARENT是谁要怎么做?? 比如有若干个车间,每个车间有若干个机器,我用PANEL代表车间,用SHPAE代表机器,所以当我在车间一里增加机器时,那个shape的PARENT就要是车间一的对应的那个PANEL对吧
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
11 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
guxingke
2004-09-21
打赏
举报
回复
怎么没有人回答了, 自己顶!!!
guxingke
2004-09-20
打赏
举报
回复
to cscer:
能不能具体一点
guxingke
2004-09-18
打赏
举报
回复
to zhaohui_1981用了人的办法还是不行的,还是看不到创建后的SHAPE
to 无风雪亦飘 我的SHAPE和PANEL不是同一个时候创建的
cscer
2004-09-18
打赏
举报
回复
给Shape赋Parent值时先检查一下Panel是否存在
不存在的话实例化一个先
cscer
2004-09-17
打赏
举报
回复
不错
已经满足需求了
wilowind
2004-09-17
打赏
举报
回复
创建shape后
shape.parent := panel
wilowind
2004-09-17
打赏
举报
回复
创建 Panel时 把panel的tag设置为 车间的id .
创建shape时, 搜索机器所在车间id ,就得到panel 的tag了.
然后遍历比较tag
minjunw
2004-09-17
打赏
举报
回复
在创建shape后,将它的parent属性赋上对应的Panel就好
zhaohui_1981
2004-09-17
打赏
举报
回复
shape := tshape.Create(your panel);
guxingke
2004-09-17
打赏
举报
回复
以上的代码不太清楚我删了一些你们看这个可能比较好点:
procedure TmainF.AddNodeClick(Sender: TObject);
var
noname: string;
panelname: string;
shapename: string;
panelno: integer;
ii: integer;
begin
selectnode := TreeView1.Selected;
nonode := TreeView1.Selected.Count; //(0<count<999)
panelno := 0;
if (selectnode.Text = '´óÔ²»ú') then begin //这也只是一个添加nonode_name 的地方
noname := '³µ¼ä' + inttostr(nonode + 1);
try
begin
panelname := 'panel' + inttostr(nonode + 1);
panel[panelno] := tpanel.Create(RzPanel1); //Ìí¼ÓSHAPE
with panel[panelno] do begin
parent := mainF;
name := panelname;
left := 208;
TOP := 32;
height := 500;
width := 585;
BEVeLOUTER := BVLOWERED;
color := clCaptionText;
// visible:=false;
end;
end;
except
showmessage('Ìí¼Ó½Úµã³ö´í£¬ÇëÈ·ÈϺóÌí¼Ó£¡');
end;
end
else if (selectnode.parent.Text = '´óÔ²»ú') then begin
nonode_name:= //这儿只是一个添加nonode_name 的地方
end;
try
begin
shapename := copy(noname, 2, length(noname) - 1);
shape := tshape.Create(self);
with shape do begin
parent := panel[nonode + 1];
// parent:=self;
name := shapename;
left := 30;
TOP := 30;
height := 300;
width := 300;
shape := stCircle;
brush.color := cllime;
brush.Style := bssolid;
end;
// showmessage(panel[nonode+1].Parent.name );
TreeView1.Items.AddChild(selectnode, noname);
end;
except
showmessage('½ÚµãÌí¼Ó³ö´í£¬ÇëÈ·ÈϺóÌí¼Ó£¡');
end;
end;
end;
我的PANEL和shape 不是同时创建的,所以把shape定父亲的时候老是出错。
guxingke
2004-09-17
打赏
举报
回复
我想要把那些SHAPE放到panel上呀,我创建SHAPE后,无法将其放到PANEL上,
procedure TmainF.AddNodeClick(Sender: TObject);
var
selectnode: TTreeNode; //±»Ñ¡ÔñµÄ½Úµã
shape: tshape;
nonode: integer; //½Úµã±¾ÉíµÄºÅÊý
noname: string; //½ÚµãÃû³Æ
sqlstr: string; //sql ÊäÈëÓï¾ä
chileno: integer; //Ô½ÚµãÖÐ×Ó½ÚµãµÄ¸öÊý
panelname: string;
shapename: string;
node_id: integer; //µ±Ç°½ÚµãµÄºÅÂë
panelno: integer;
ii: integer;
begin
selectnode := TreeView1.Selected;
nonode := TreeView1.Selected.Count; //(0<count<999)
panelno := 0;
// if (selectnode.Text = '´óÔ²»ú') or (selectnode.Parent.Text = '´óÔ²»ú') then begin
if (selectnode.Text = '´óÔ²»ú') then begin //Ìí¼Ó³µ¼äºÅ
noname := '³µ¼ä' + inttostr(nonode + 1);
try
begin
panelname := 'panel' + inttostr(nonode + 1);
panel[panelno] := tpanel.Create(RzPanel1); //Ìí¼ÓSHAPE
with panel[panelno] do begin
parent := mainF;
name := panelname;
left := 208;
TOP := 32;
height := 500;
width := 585;
BEVeLOUTER := BVLOWERED;
color := clCaptionText;
// visible:=false;
end;
end;
except
showmessage('Ìí¼Ó½Úµã³ö´í£¬ÇëÈ·ÈϺóÌí¼Ó£¡');
end;
end
else if (selectnode.parent.Text = '´óÔ²»ú') then begin
if (nonode > 8) and (nonode <= 98) then begin //Èç¹ûÉ豸̨Êý´óÓÚ9̨СÓÚµÈÓÚ98
if (length(selectnode.Text) = 5) then //³µ¼äºÅ¡´9
noname := 'NO' + '0' + copy(selectnode.Text, length(selectnode.Text), 1) + '0' + inttostr(nonode + 1)
else if (length(selectnode.Text) = 6) then //³µ¼äºÅ>9
noname := 'NO' + copy(selectnode.Text, length(selectnode.Text) - 1, 2) + '0' + inttostr(nonode + 1);
end
else if nonode <= 8 then begin //Èç¹ûÉ豸̨ÊýСÓÚ9̨
if (length(selectnode.Text) = 5) then //³µ¼äºÅ¡´9
noname := 'NO' + '0' + copy(selectnode.Text, length(selectnode.Text), 1) + '00' + inttostr(nonode + 1)
else if (length(selectnode.Text) = 6) then //³µ¼äºÅ>9
noname := 'NO' + copy(selectnode.Text, length(selectnode.Text) - 1, 2) + '00' + inttostr(nonode + 1);
end
else if nonode > 98 then begin //Èç¹ûÉ豸̨Êý´óÓÚ98̨
if (length(selectnode.Text) = 5) then //³µ¼äºÅ¡´9
noname := 'NO' + '0' + copy(selectnode.Text, length(selectnode.Text), 1) + inttostr(nonode + 1)
else if (length(selectnode.Text) = 6) then //³µ¼äºÅ>9
noname := 'NO' + copy(selectnode.Text, length(selectnode.Text) - 1, 2) + inttostr(nonode + 1);
end;
try
begin
shapename := copy(noname, 2, length(noname) - 1);
shape := tshape.Create(self);
with shape do begin
parent := panel[nonode + 1];
// parent:=self;
name := shapename;
left := 30;
TOP := 30;
height := 300;
width := 300;
shape := stCircle;
brush.color := cllime;
brush.Style := bssolid;
end;
// showmessage(panel[nonode+1].Parent.name );
end;
except
showmessage('½ÚµãÌí¼Ó³ö´í£¬ÇëÈ·ÈϺóÌí¼Ó£¡');
end;
end;
end;
这是我创建SHAPE和panel的代码,请各位看看现在shape有创建,可是看不到,为什么呢?????
tensorRT模型推理时
动态
shape
和之前全连接的代码唯一的区别就是两个点,一个是网络结构的
定
义...在全卷积网络中我们通常就是有这个诉求的,推理时的
shape
是可以
动态
改变的,不一
定
要限制死,这个
动态
shape
不一
定
只宽高,还指batchsize也是
动态
的。
【tensorrt】——
动态
shape
杂谈/pool/resize
tensorrt 不知道在哪个版本开始就支持了dynamic
shape
,然后以前也没有试过,最近有这个想法,有一
定
时间就测试了一下。整个过程有助于对tensorrt模型转换,tensorrt引擎推理有更深一步的了解和认识。 2. 不支持的op...
tensorflow 基础: static
shape
VS Dynamic
shape
, get_
shape
VS tf.
shape
() , re
shape
VS set_
shape
######################################################################################### ... 在tensorflow中构建的图中的每个节点的tensor有两个
shape
: static
shape
和 dynamic
shape
....
4.4.tensorRT基础(1)-模型推理时
动态
shape
的具体实现要点
4.4.tensorRT基础(1)-模型推理时
动态
shape
的具体实现要点
Android样式之
shape
标签(基础)
shape
Delphi
5,388
社区成员
262,730
社区内容
发帖
与我相关
我的任务
Delphi
Delphi 开发及应用
复制链接
扫一扫
分享
社区描述
Delphi 开发及应用
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章