其他分享
首页 > 其他分享> > Aardio - 字体随窗口大小自动缩放

Aardio - 字体随窗口大小自动缩放

作者:互联网

看效果: 

上代码:

import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add(
static={cls="static";text="Static";left=308;top=185;right=518;bottom=354;ah=1;aw=1;font=LOGFONT(h=-32);transparent=1;z=1}
)
/*}}*/

var f = winform.static.getFont()
var h=f.h
var wh = winform.height

import godking.on
godking.on(winform).onSize = function(cw,ch,sizeType){
	f.h=ch/wh*h
	winform.static.setFont(f);	
}

winform.show();
win.loopMessage();

 

标签:right,缩放,win,Aardio,ch,static,var,字体,winform
来源: https://blog.csdn.net/sdlgq/article/details/122024179