delphi中回车memo控件的问题?

delphi中回车memo控件的问题?,第1张

Memo1Clear(); // 清空Memo中原来的内容
Memo1LineAdd(Edit1Text); // Memo添加一行内容,文字从Edit1中获取
Memo1LineAdd(Edit2Text); // Memo再添加一行内容,这次从Edit2中获取
--------
就这三行代码,一行清除之前的内容,两行添加。
PS:纯手打,我电脑里没有Delphi了,不确定上面是Line还是Lines,貌似是后者,你将就着看吧。
另外,建议你加一下CnPack的扣扣群,貌似目前Delphi讨论比较活跃的就是他们了,比在这里提问要快。

源码WPAttributedMarkup, WPAttributedMarkup能给Label中某关键字添加文字效果或点击事件。Label中的某个关键字词可以改变字体的特性如颜色、加粗,下划线等,也可以为某个关键字词添加点击事件。

<ignore_js_op>

使用方法:

通过创建不同的style的字典后就可以对label的属性进行设置,示例如下:

// Example using fonts and colours

NSDictionary style1 = @{@"body":[UIFont fontWithName:@"HelveticaNeue" size:180],

@"bold":[UIFont fontWithName:@"HelveticaNeue-Bold" size:180],

@"red": [UIColor redColor]};

// Example using arrays of styles, dictionary attributes for underlining and image styles

NSDictionary style2 = @{@"body" :

@[[UIFont fontWithName:@"HelveticaNeue-Bold" size:180],

[UIColor darkGrayColor]],

@"u": @[[UIColor blueColor],

@{NSUnderlineStyleAttributeName : @(kCTUnderlineStyleSingle|kCTUnderlinePatternSolid)}

],

@"thumb":[UIImage imageNamed:@"thumbIcon"] };

// Example using blocks for actions when text is tapped Uses the 'link' attribute to style the links

NSDictionary style3 = @{@"body":[UIFont fontWithName:@"HelveticaNeue" size:220],

@"help":[WPAttributedStyleAction styledActionWithAction:^{

NSLog(@"Help action");

}],

@"settings":[WPAttributedStyleAction styledActionWithAction:^{

NSLog(@"Settings action");

}],

@"link": [UIColor orangeColor]};

selflabel1attributedText = [@"AttributedBoldRedtext" attributedStringWithStyleBook:style1];

selflabel2attributedText = [@"[td]Multiplestylestext[td]" attributedStringWithStyleBook:style2];

<br/>

本文来源于<b>大学IT网</b>

 

RichTextBox:多行文本框,
可以通过Text属性设置其文本,也可以调用AppendText函数追加文本,还可以使用ScroolToCreate使其滚动到插入新文本的位置。

bootstrap引用图标的方法:
1、下载包并解压
在‘elegant_font’文件夹中会发现“HTML CSS”子文件夹,把它复制到你的项目中(注意,这里可以重命名哦)
2、将连接添加到‘stylecss’,html里添加一个图标,内容如下:
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
<link rel="stylesheet" href="path/to/elegant-font/stylecss">
可以在你HTML里添加图标,并且使用CSS来更改它们的样式:
<span aria-hidden="true" class="icon_pencil"></span>


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/13085693.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-30
下一篇 2023-05-30

发表评论

登录后才能评论

评论列表(0条)

保存