从子窗口向父窗口增加tab选项卡

admin2020-12-07  2.3K+

父窗口代码

import win.ui;
/*DSG{{*/
winform1 = win.form(text="aardio form";right=759;bottom=469)
winform1.add(
button={cls="button";text="Button";left=200;top=128;right=368;bottom=232;z=1};
plus={cls="plus";left=440;top=48;right=600;bottom=96;background="E:\图片素材\png\png_花边纸底纹\Folder.jpg";z=2};
plus2={cls="plus";left=440;top=120;right=632;bottom=192;background="E:\图片素材\png\png_花边纸底纹\花边\bird1_bc_happytime.png";z=3}
)
/*}}*/

winform1.show();

import win.ui.tabs

winform1.tbs = win.ui.tabs(
	winform1.plus,winform1.plus2
)

winform1.tbs.add({
	text="标题文本";
	foreground="\res\images\icon.png";
})

winform1.button.oncommand = function(id,event){
	var frmChild = winform1.loadForm("\dlg\aaa.aardio");
	frmChild.show();
}

win.loopMessage();
return winform1;

子窗口代码

import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
button={cls="button";text="Button";left=368;top=208;right=464;bottom=304;z=1}
)
/*}}*/

winform.button.oncommand = function(id,event){
    import win.ui.tabs
	winform1.tbs.add({
		text="标题文本";
		foreground="\res\images\icon.png";
})
}

winform.show();
win.loopMessage();
return winform;
转载请注明原文地址: http://www.aardio.net/read-21.html
最新回复(0)
winform(win)
aardio winform(win)