• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

delphiStyleTBitmapLink

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

New Bitmap Links Editor

 http://docwiki.appmethod.com/appmethod/1.17/topics/en/What's_New

A new editor allows graphic edition for TBitmapLink properties on styled-objects, directly inside the IDE.

TBitmapLink properties can be edited now in an easy and visual way using the BitmapLinks Editor.

For more information, see BitmapLinks Editor and Tutorial: Using the BitmapLinks Editor.

 

 

Create Custom Button Styles For Firemonkey In #Delphi 10 Seattle On Android And IOS

http://www.fmxexpress.com/create-custom-button-styles-for-firemonkey-in-delphi-10-seattle-on-android-and-ios/

Developer Sarina DuPont from Embarcadero has a tutorial up on how to create a custom button using styles for Firemonkey in Delphi 10 Seattle. Styles in Firemonkey are bitmap based and this tutorial shows how to load a custom button image and set it up on a button. You can use these custom styles in your apps on Android, IOS, OSX, and Windows. You access the style editor by right clicking on the object and selecting Edit Custom Style. The style editor supports having different images for the different resolutions of the different devices. For buttons it uses a 9 grid to handle the button resizing dynamically. The image is segmented into 9 pieces with one piece in each corner, one piece on each side, and one piece in the middle. The button states (up, down, etc.) are handled in a BitmapLinks editor. In the case of a button it has NormalLink, HotLink, PressedLink, and FocusedLink. This basically means that each “link” is a specific image for the state of the button during that kind of event. You should be able to following this tutorial for Appmethod and C++Builder as well. Don’t have time to create your own styles? Check out the free premium styles.

 

http://docwiki.embarcadero.com/RADStudio/Berlin/en/Tutorial:_Using_the_BitmapLinks_Editor

This tutorial explains how to edit the TBitmapLink properties of a TButton component using the BitmapLinks Editor.

Let us consider a one-button multi-device application. The button has different background colors for each of the possible link types listed in the following table:

Link type Definition

NormalLink

The default status.

FocusedLink

A focused link. In our scenario, when the button takes the focus, for example, while hovering the mouse over the button.

PressedLink

A clicked link. In our scenario, while clicking the button.

HotLink

A visited link. In our scenario, after clicking the button.

Customizing BitmapLink Properties for a Button

This section illustrates how to customize the button background. Perform the following steps:

  1. Create a new Multi-Device Application, either Delphi or C++Builder.
  2. On the Form Designer, drop a TButton component.
  3. To open the FireMonkey Style Designer, right-click the button, and on the context menu, select Edit Custom Style.
  4. In the Structure pane, select the background node.
  5. In the Object Inspector, select the NormalLink property and double-click its value to open the BitmapLinks Editor.
  6. In the BitmapLinks Editor, click to load the image file that you want to use to customize the button.
    In our example, we use the following image file:
  7. Select NormalLink from the Links panel.
  8. Select the resolution from the Resolutions panel.
    Note: For Windows style the only available resolution is Scale 1,00x.
  9. In the bitmap, select an area to use as the button background.
    Note: The selection appears on the Previsualization panel. In our scenario, for NormalLink, we have selected the blue rectangle.
  10. Perform steps 7 to 9 for each of the links: HotLink, FocusedLink and PressedLink.
  11. Click Close to exit from the BitmapLinks Editor.
  12. Apply changes in the FireMonkey Style Designer, click Apply and Close.
  13. Run the application to see the results.

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
一名Delphi程序员的开发习惯发布时间:2022-07-18
下一篇:
DelphiRichEx图像发布时间:2022-07-18
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap