DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: 33227
今日帖子: 14
在线用户: 21
导航: 论坛 -> 移动应用开发 斑竹:flyers,iamdream  
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2021/12/19 23:03:34
标题:
请赐教:Delphi 10.2 ListBox自定义风格后,无法选中 浏览:1910
加入我的收藏
楼主: 我是这么:
var Item: TListBoxItem;
  begin
    Item := TListBoxItem.Create(nil);
    Item.Parent := ListBox1;
    Item.Height:=130;
    Item.StyleLookup := 'selectgoods';
    Item.StylesData['GoodsFullName'] := '中华铅笔';
    Item.StylesData['GoodsSta'] := '2B';
  end;
自定义风格的时候把默认带的都删除了,自己加入如图

然后,编译执行后,显示正常,就是点击某个Item时,没有被选中的(背景变灰)
的感觉。
尝试,不删除原来默认的风格里的,直接加入后自定义Item格式后,Item.StylesData['GoodsFullName']的内容不显示,请教:哪里的问题呢?
此帖子包含附件:
PNG 图像
大小:26.6K
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 2:10:45
1楼: try my sample
此帖子包含附件:emailx45_2021122021044.zip 大小:70.9K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 2:11:12
2楼: my sample screenshot
此帖子包含附件:
PNG 图像
大小:73.8K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 6:25:38
3楼: sorry, I forgot this...
此帖子包含附件:
PNG 图像
大小:14.0K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 9:06:46
4楼: new demo with animations

NO VIRUS, NO SPYWARE, NO CODE :_))))
此帖子包含附件:emailx45_202112209554.zip 大小:2.92M
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 9:07:04
5楼: screenshot
此帖子包含附件:
PNG 图像
大小:45.1K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
作者:
男 sxfgf (FC_FGF) ★☆☆☆☆ -
普通会员
2021/12/20 15:30:42
6楼:  emailx45,大神好!

如果时安卓下的呢?
----------------------------------------------
偶尔做做代码应付一下工作,却发现Delphi已成必配
作者:
男 janker (janker) ★☆☆☆☆ -
盒子活跃会员
2021/12/20 15:37:09
6楼: 选中和不选中,不是ITEM控制的,是Listbox控制的,listbox的Style.content.selection,如果用默认的,就不要改listbox的Style,如果要改listbox的Style,最好按默认的Style的项和名称来改(项目和名称不变,只改需要的位置和颜色什么的).
还有做Style的时候,注意下HiTtest,因为拖拉控件的时候,有些控件的HiTtest=true,在Style里,默认全部=false,如果需要为true,在代码里再改
----------------------------------------------
-
作者:
男 janker (janker) ★☆☆☆☆ -
盒子活跃会员
2021/12/20 15:44:31
7楼: 我的一个style:
选中为半透明灰色
此帖子包含附件:
PNG 图像
大小:177.0K
----------------------------------------------
-
作者:
男 emailx45 (emailx45) ▲▲▲▲△ -
普通会员
2021/12/20 21:37:42
8楼: my test on Android 11 - 64bits
此帖子包含附件:
PNG 图像
大小:96.1K
----------------------------------------------
The higher the degree, the greater the respect given to the humblest!RAD 11.3
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行953.125毫秒 RSS