捐赠 | 广告 | 注册 | 发布 | 上传 | 关于我们    
  沪ICP备05001939号 DELPHI盒子 | 盒子论坛 | 盒子文章 | 盒子问答悬赏 | 最新更新 | 论坛检索 | 下载中心 | 高级搜索    
  精品专区 | 繁體中文 | 奖励公告栏 | 直通车账号登陆 | 关闭GOOGLE广告 | 临时留言    
盒子资源分类
全部展开 - 全部合拢
XSpaceMutiSelectComboBox v1.00 (下拉多选框)
关键字:XSpaceMutiSelectComboBox 多选框 下拉
来 自:原创
平 台:Win9x,Win2k/XP/NT,Win2003 下载所需:0 火柴
深浅度:中级 完成时间:2003/7/1
发布者:harry 发布时间:2005/1/5
编辑器:D4,D5,D6,D7,D2005 语  种:简体中文
分 类:列表与选项框 下载浏览:4814/19609
加入到我的收藏
下载错误报错
登陆以后才能下载
 用户名:
 密 码:
自动登陆(30天有效)
图片如果打不开,说明流量不够了,请稍候下载……
XSpaceMutiSelectComboBox
version: 1.00
Author: Harry
Use in D4,D5,D6,D7,D2005
----------
简要介绍:
下拉多选框,可自定义分隔符号,扩展了原本的下拉框功能,提供了下拉多选功能,并可以自定义输出分隔符号,多谢大家使用,提供完全源代码和技术支持。
----------
安装方法:
1、首先打开Delphi在菜单里选择Component-->Install Component...。
2、然后在弹出对话框的Unit file name:栏点击Browse...按钮选择XSpaceMutiSelectComboBox.pas文件然后按OK。
3、然后在弹出对话框里按Compile按钮编译然后保存。
4、最后在XSpace控件栏里就会看到。
----------
使用方法:
    本控件和ComboBox的使用方法一样,唯一不同的是,多了SpliterFlag属性,用户可以通过这个属性来设置分隔符默认是空格可以设置为逗号或者其它的符号,然后再Items里写入多个选项,当用户使用时就会看到并可以通过下拉框任意选择多个选项。
----------
控件属性:
HorzScrollBar : boolean //下列表是否出现滚动条
SplitterFlag: String //分隔符,默认是空格
----------
技术支持:harrymft@yahoo.com.cn
----------
版权所有:
本控件的开发由XSpace Team著作并拥有最终著作权和使用权任何人不得以商业形式出售或翻版用户可以进行相互分发、学习、交流和使用但要携带本说明文件。
Copyright(C)XSpace Team 2005
Google
 
本站原创作品,未经作者许可,严禁任何方式转载;转载作品,如果侵犯了您的权益,请联系我们
龙脉加密锁 15元起 Grid++Report 报表 申请支付@网
 相关文章
没有相关文章
相关评论
共有评论16条 当前显示最后6条评论
harry 2005/1/8 12:22:20
谢谢你的意见,我们会改进。
shangshang 2005/1/10 15:06:54
举些例子吧, 这种界面用在什么操作场合比较合适呢??
harry 2005/1/10 15:44:37
比如说为了节省空间或者是使界面一致漂亮等等,一般特殊的用法多些。
cds 2007/3/26 20:34:52
好。
caodongdong0423 2007/8/8 17:42:50
修改一下
procedure TXSpaceMutiSelectComboBox.ListBoxMouseDown(Sender: TObject; Button: TMouseButton;
        Shift: TShiftState; X, Y: Integer);
begin
  if (Sender As TCheckListBox).ItemIndex = -1 then
    exit;
  if X > 15 then
  begin
    Toggle( (Sender As TCheckListBox).ItemIndex );
  end;
end;

procedure TXSpaceMutiSelectComboBox.DropDown;
var
  ScreenPoint : TPoint;
  nDropDown, i,iRes : integer;
  strTmp: string;
begin
  Inherited;
  if ( DropDownCount <= Items.Count ) then
    nDropDown := DropDownCount
  else
    nDropDown := Items.Count;

  // Assign Form coordinate and show
  ScreenPoint := Parent.ClientToScreen( Point( self.Left, self.Top+self.Height ) );
  FListBox.Font := self.Font;
  FListBox.Color := self.Color;
  FListBox.ItemHeight := self.ItemHeight;
  FListBox.Items.Assign( Items );

  with FDDForm do
    begin
      Font := self.Font;
      Left  := ScreenPoint.X;
      Top   := ScreenPoint.Y;
      Width := self.Width;
      Height := ( nDropDown * self.ItemHeight ) + 5;
      if FHorzScrollBar then
        Height := Height + Horizontal_ScrollBar;
      Color := clAqua;
      BorderStyle := bsNone;
      OnDeactivate := ClosePopUp;
    end;
  if FHorzScrollBar then
    SendMessage(FListbox.Handle, LB_SetHorizontalExtent, 1000, Longint(0));
  FDDForm.Show;

  strTmp := self.Text;
  while Pos(',', strTmp) > 0 do
  begin
    iRes := FListBox.Items.IndexOf(Copy(strTmp, 1, Pos(',', strTmp)-1));
    if iRes >= 0 then
    begin
      FListBox.Checked[iRes] := True;
    end;
    Delete(strTmp, 1,Pos(',', strTmp));
  end;
  if strTmp <> '' then
  begin
    iRes := FListBox.Items.IndexOf(strTmp);
    if iRes >= 0 then
    begin
      FListBox.Checked[iRes] := True;
    end;
  end;
//  for i:=0 to FSelectIndex.Count-1 do
//     FListBox.Checked[StrToInt(FSelectIndex.Strings[i])]:= True;
end;
superkind 2012/7/20 16:12:23
出现下拉列表时还是会刷两次,这个实在不足,望改进!
我要发表评论 查看全部评论
 
  DELPHI盒子版权所有 1999-2023 V4.01 粤ICP备10103342号-1 更新RSS列表