引言: 1. 建立一个窗体
2. 放一个ComboBox和Listbox
3. 改变Component的Style为csOwnerDrawVariable和ListBox的Style为lbOwnerDrawVariable。
摘要:
delphi模式编程之策略模式(续)
刘 艺
1.3 策略模式在酒店管理系统中的应用
在酒店管理系统中,通常客房的价格不是一成不变的。对于住宿的淡季和旺季、老客户和新客户、散客和团队,都应该有不同的销售策略。显然,销售策略决定了报价。但是基于销售策略的报价体系又不能绑定于某一具体的客户端,因为只有把基于销售策略的报价体系独立出来,才能保证其重用性和可维护性。比如:一种报价体系一方面......
摘要:
刚刚接触的delphi的朋友,可能最感兴趣的就是它丰富、强大的vcl(可视化构件库)。仅仅向窗体上扔几个构件,甚至不用动手写代码,就能很容易地做出一个有实用价值的程序,真是令人激动。但是,vcl只是delphi的一小部分,delphi的优秀远远不只是表现在vcl上。如果你仅仅停留在使用vcl这一阶段,那么你永远也不可能成为一个真正的delphi高手。记住,必须超越vcl,才能够接触到de......
Delphi学习:在Listbox加背景图1. 建立一个窗体
2. 放一个combobox与listbox 【程序编程相关:
Delphi图象截取编程示例(2)
】 【推荐阅读:
Delphi图象截取编程示例(6)
】
3. 改变component的style为csownerdrawvariable与listbox的style为lbownerdrawvariable. 【扩展信息:
Delphi的ClientDataSet】
4. 声明5个tbitmap的全局变量
5. 覆盖form的oncreate.
6. 覆盖combobox的ondraw.
7. 覆盖combobox的onmeasureitem.
8. 释放资源在form的onclose.
unit ownerdrw;
interface
uses
sysutils, wintypes, winprocs, messages, classes, graphics, controls,
forms, dialogs, stdctrls;
type
tform1 = class(tform)
combobox1: tcombobox;
listbox1: tlistbox;
procedure formcreate(sender: tobject);
procedure formclose(sender: tobject; var action: tcloseaction);
procedure combobox1drawitem(control: twincontrol; index: integer;
rect: trect; state: townerdrawstate);
procedure combobox1measureitem(control: twincontrol; index: integer;
var height: integer);
procedure listbox1drawitem(control: twincontrol; index: integer;
rect: trect; state: townerdrawstate);
procedure listbox1measureitem(control: twincontrol; index: integer;
var height: integer);
private ...
下一页 摘要: 目前计算机中用得最广泛的字符集及其编码,是由美国国家标准局(ansi)制定的ascii码(american standard code for information interchange,美国标准信息交换码),它已被国际标准化组织(iso)定为国际标准,称为iso 646标准。适用于所有拉丁文字字母,ascii码有7位码和8位码两种形式。 因为1位二进制数可以表示(21=)2种状态:0、1;......