起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 310|回复: 13

【搞定】[请求]为i什么下拉菜单是灰色的?**

[复制链接]
发表于 2007-4-6 15:18:06 | 显示全部楼层 |阅读模式
unit MainForm;

interface

uses
  Business.System, Business.Model, Business.Forms, Business.Data;

type
  TMainForm = class(TForm)
    FuncBroker: TFuncBroker;
    InfoBrokerXGDRCYWXX: TInfoBroker;
    ControlBar: TControlBar;
    DataNavigator: TDataNavigator;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    DataGrid1: TDataGrid;
    DateTimePicker1: TDateTimePicker;
    DateTimePicker2: TDateTimePicker;
    InfoBroker1: TInfoBroker;
    DataSetBroker1: TDataSetBroker;
    DataGrid1BH: TDataGridColumn;
    DataGrid1SSXGD: TDataGridColumn;
    DataGrid1XM: TDataGridColumn;
    DataGrid1XB: TDataGridColumn;
    DataGrid1SFZHM: TDataGridColumn;
    DataGrid1CSNY: TDataGridColumn;
    DataGrid1JG: TDataGridColumn;
    DataGrid1MZ: TDataGridColumn;
    DataGrid1XL: TDataGridColumn;
    DataGrid1ZC: TDataGridColumn;
    DataGrid1HYZK: TDataGridColumn;
    DataGrid1GZZW: TDataGridColumn;
    DataGrid1XZJB: TDataGridColumn;
    DataGrid1ZZMM: TDataGridColumn;
    DataGrid1BYXX: TDataGridColumn;
    DataGrid1SXZY: TDataGridColumn;
    DataGrid1GRZZ: TDataGridColumn;
    DataGrid1SFYJRC: TDataGridColumn;
    DataGrid1YJDW: TDataGridColumn;
    DataGrid1YJNY: TDataGridColumn;
    DataGrid1SFPYRC: TDataGridColumn;
    DataGrid1PYNY: TDataGridColumn;
    DataGrid1PYDW: TDataGridColumn;
    DataGrid1GWPY: TDataGridColumn;
    DataGrid1QWPY: TDataGridColumn;
    DataGrid1QNPY: TDataGridColumn;
    DataGrid1BDZK: TDataGridColumn;
    DataGrid1BDNY: TDataGridColumn;
    DataGrid1JL: TDataGridColumn;
    DataGrid1HJQK: TDataGridColumn;
    DataGrid1MQCDXM1: TDataGridColumn;
    DataGrid1XM1JS: TDataGridColumn;
    DataGrid1MQCDXM2: TDataGridColumn;
    DataGrid1XM2JS: TDataGridColumn;
    DataGrid1MQCDXM3: TDataGridColumn;
    DataGrid1XM3JS: TDataGridColumn;
    DataGrid1MQCDXM4: TDataGridColumn;
    DataGrid1XM4JS: TDataGridColumn;
    DataGrid1MQCDXM5: TDataGridColumn;
    DataGrid1XM5JS: TDataGridColumn;
    DataGrid1XP: TDataGridColumn;
    DataGrid1CDXMQK: TDataGridColumn;
    DataGrid1XXDS: TDataGridColumn;
    DataGrid1ZXDS: TDataGridColumn;
    DataGrid1GZDS: TDataGridColumn;
    DataGrid1DXDDXBK: TDataGridColumn;
    DataGrid1GDSS: TDataGridColumn;
    DataGrid1GDBS: TDataGridColumn;
    DataGrid1GZ: TDataGridColumn;
    DataGrid1XC: TDataGridColumn;
    DataGrid1XMMC: TDataGridColumn;
    DataGrid1LXRQ: TDataGridColumn;
    DataGrid1WCRQ: TDataGridColumn;
    DataGrid1XMJB: TDataGridColumn;
    DataGrid1DRJS: TDataGridColumn;
    DataGrid1XMJE: TDataGridColumn;
    DataGrid1XMZK: TDataGridColumn;
    DataLocateComboBox1: TDataLocateComboBox;
    DataLocateComboBox2: TDataLocateComboBox;
    DataLocateComboBox3: TDataLocateComboBox;
    DataLocateComboBox4: TDataLocateComboBox;
    Button1: TButton;
    procedure BizFormCreate(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

implementation

procedure TMainForm.BizFormCreate(Sender: TObject);
begin

end;

end.

查询效果1.jpg

35.24 KB, 下载次数: 177

回复

使用道具 举报

 楼主| 发表于 2007-4-6 15:30:55 | 显示全部楼层
组件上上去了,对代码不熟,所以想请教个思路,都分别对什么事件写代码?
回复 支持 反对

使用道具 举报

发表于 2007-4-6 16:29:06 | 显示全部楼层
呵呵,不知道你想问啥,你结合你1楼图片说说下拉菜单是灰色的?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 16:33:35 | 显示全部楼层
就是说,现在运行窗体以后,生成的效果里,下拉都是灰色的,只有日期可以选。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 16:39:21 | 显示全部楼层
可以教下我,我希望点”查询“button就可以根据设定的条件得出查询的结果,很希望知道,真的。先谢谢了。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 16:59:13 | 显示全部楼层
就是说,现在运行窗体以后,生成的效果里,下拉都是灰色的,只有日期可以选。而且button不起作用
回复 支持 反对

使用道具 举报

发表于 2007-4-6 17:00:32 | 显示全部楼层
1、检查这些控件是否连接数据源(DataSource)
2、检查数据源是否打开
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-6 17:13:51 | 显示全部楼层
数据源已经打开了,看属性。
楼主说的两个条件我都做到了。
unit MainForm;

interface

uses
  Business.System, Business.Model, Business.Forms, Business.Data;

type
  TMainForm = class(TForm)
    FuncBroker: TFuncBroker;
    InfoBrokerXGDRCYWXX: TInfoBroker;
    ControlBar: TControlBar;
    DataNavigator: TDataNavigator;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Label5: TLabel;
    Label6: TLabel;
    DataGrid1: TDataGrid;
    DateTimePicker1: TDateTimePicker;
    DateTimePicker2: TDateTimePicker;
    InfoBroker1: TInfoBroker;
    DataSetBroker1: TDataSetBroker;
    DataGrid1BH: TDataGridColumn;
    DataGrid1SSXGD: TDataGridColumn;
    DataGrid1XM: TDataGridColumn;
    DataGrid1XB: TDataGridColumn;
    DataGrid1SFZHM: TDataGridColumn;
    DataGrid1CSNY: TDataGridColumn;
    DataGrid1JG: TDataGridColumn;
    DataGrid1MZ: TDataGridColumn;
    DataGrid1XL: TDataGridColumn;
    DataGrid1ZC: TDataGridColumn;
    DataGrid1HYZK: TDataGridColumn;
    DataGrid1GZZW: TDataGridColumn;
    DataGrid1XZJB: TDataGridColumn;
    DataGrid1ZZMM: TDataGridColumn;
    DataGrid1BYXX: TDataGridColumn;
    DataGrid1SXZY: TDataGridColumn;
    DataGrid1GRZZ: TDataGridColumn;
    DataGrid1SFYJRC: TDataGridColumn;
    DataGrid1YJDW: TDataGridColumn;
    DataGrid1YJNY: TDataGridColumn;
    DataGrid1SFPYRC: TDataGridColumn;
    DataGrid1PYNY: TDataGridColumn;
    DataGrid1PYDW: TDataGridColumn;
    DataGrid1GWPY: TDataGridColumn;
    DataGrid1QWPY: TDataGridColumn;
    DataGrid1QNPY: TDataGridColumn;
    DataGrid1BDZK: TDataGridColumn;
    DataGrid1BDNY: TDataGridColumn;
    DataGrid1JL: TDataGridColumn;
    DataGrid1HJQK: TDataGridColumn;
    DataGrid1MQCDXM1: TDataGridColumn;
    DataGrid1XM1JS: TDataGridColumn;
    DataGrid1MQCDXM2: TDataGridColumn;
    DataGrid1XM2JS: TDataGridColumn;
    DataGrid1MQCDXM3: TDataGridColumn;
    DataGrid1XM3JS: TDataGridColumn;
    DataGrid1MQCDXM4: TDataGridColumn;
    DataGrid1XM4JS: TDataGridColumn;
    DataGrid1MQCDXM5: TDataGridColumn;
    DataGrid1XM5JS: TDataGridColumn;
    DataGrid1XP: TDataGridColumn;
    DataGrid1CDXMQK: TDataGridColumn;
    DataGrid1XXDS: TDataGridColumn;
    DataGrid1ZXDS: TDataGridColumn;
    DataGrid1GZDS: TDataGridColumn;
    DataGrid1DXDDXBK: TDataGridColumn;
    DataGrid1GDSS: TDataGridColumn;
    DataGrid1GDBS: TDataGridColumn;
    DataGrid1GZ: TDataGridColumn;
    DataGrid1XC: TDataGridColumn;
    DataGrid1XMMC: TDataGridColumn;
    DataGrid1LXRQ: TDataGridColumn;
    DataGrid1WCRQ: TDataGridColumn;
    DataGrid1XMJB: TDataGridColumn;
    DataGrid1DRJS: TDataGridColumn;
    DataGrid1XMJE: TDataGridColumn;
    DataGrid1XMZK: TDataGridColumn;
    DataLocateComboBox1: TDataLocateComboBox;
    DataLocateComboBox2: TDataLocateComboBox;
    DataLocateComboBox3: TDataLocateComboBox;
    DataLocateComboBox4: TDataLocateComboBox;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure BizFormCreate(Sender: TObject);
  private
    {private declarations}
  public
    {public declarations}
  end;

implementation





procedure TMainForm.BizFormCreate(Sender: TObject);
begin

end;

end.

12.jpg

42.16 KB, 下载次数: 182

回复 支持 反对

使用道具 举报

发表于 2007-4-7 10:11:38 | 显示全部楼层
啥代码都没有看到,你在“编号”后面的DataLocateComboBox 的OnClick 事件上,写一个DataLocateComboBox 看看这个的数据 的 Active 属性是啥,、
回复 支持 反对

使用道具 举报

发表于 2007-4-9 00:32:00 | 显示全部楼层
好的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-1-16 08:23 , Processed in 0.044367 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表