捐赠 | 广告 | 注册 | 发布 | 上传 | 关于我们    
  沪ICP备05001939号 DELPHI盒子 | 盒子论坛 | 盒子文章 | 盒子问答悬赏 | 最新更新 | 论坛检索 | 下载中心 | 高级搜索    
  精品专区 | 繁體中文 | 奖励公告栏 | 直通车账号登陆 | 关闭GOOGLE广告 | 临时留言    
 
广告
评论:XSpaceMutiSelectComboBox v1.00 (下拉多选框)
superkind 42590 2012/7/20 16:12:23
出现下拉列表时还是会刷两次,这个实在不足,望改进!
caodongdong0423 30762 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;
cds 28561 2007/3/26 20:34:52
好。
harry 11562 2005/1/10 15:44:37
比如说为了节省空间或者是使界面一致漂亮等等,一般特殊的用法多些。
shangshang 11560 2005/1/10 15:06:54
举些例子吧, 这种界面用在什么操作场合比较合适呢??
harry 11438 2005/1/8 12:22:20
谢谢你的意见,我们会改进。
xvjie2002 11335 2005/1/6 21:58:12
所以我暂时删除 ,不用了
xvjie2002 11334 2005/1/6 21:55:55
你的控件无法逆操作!大缺点!
如果手动在编辑框中写入“A,C,D”按回车或离开焦点,却无法自动对列表中的CHECK进行判断是否打勾打叉。
xvjie2002 11331 2005/1/6 21:06:07
希望你能再写个数据感知版
520god 11323 2005/1/6 19:55:21
不好意思!刚接触DELPHI,能说说这个控件通常都用在什么地方呢?
xj_zh 11319 2005/1/6 18:45:11
不错
harry 11312 2005/1/6 16:12:35
To dacsd:
你看以通过点击鼠标右键然后选择全选或者是全部反选,如果你学要中文版的话,可以在源代码的117行和119行,把英文改为中文即可
harry 11310 2005/1/6 15:42:30
谢谢你的意见,我们会尽块改进的
dacsd 11306 2005/1/6 14:11:49
再提个建议:
能不能在下拉的下端设计三个按钮,其中一个是全部选定,全部取消和反向选择,以前见过一个这样的控件,一直没有找到哪有下载。
dacsd 11305 2005/1/6 14:06:39
不错,以前找了好久没有找到。
谢谢提供。
9903 11276 2005/1/5 21:44:44
嗯,好东西,前段时间正好需要,不过已经从网上找到了。
第一页 上一页 下一页 最后页 有 16 条纪录 共1页 1 - 16
 用户名:
 密 码:
自动登陆(30天有效)
 
  DELPHI盒子版权所有 1999-2023 V4.01 粤ICP备10103342号-1 更新RSS列表