cxDBImagecombobox文字靠某边放置 定义了个函数,功能基本与cxDBImagecombobox原功能类似,但在调用该函数时,现在返回的文字是靠cxDBImagecombobox的右边,不像原控件功能返回值时靠左放置。所以想问下这个控件的文字摆放位置(靠左或靠右)能否自己设置?谢谢了~~说的比较乱,可忽视前面的东西,直接看问题... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 /// <summary>////// </summary>/// <param name="Handle">控件句柄 </param>/// <param name="Value">TAlignment类型的值 </param>procedure SetAlignment(const Handle: THandle; const Value: TAlignment);var style: DWORD;begin if FAlignment <> Value then begin FAlignment := Value; Style := GetWindowLong(Handle, GWL_STYLE); style := style and (not ES_LEFT) and (not ES_CENTER) and (not ES_RIGHT); case FAlignment of taLeftJustify: SetWindowLong(Handle, GWL_STYLE, style or ES_LEFT); taRightJustify: SetWindowLong(Handle, GWL_STYLE, style or ES_RIGHT); taCenter: SetWindowLong(Handle, GWL_STYLE, style or ES_CENTER); end; Invalidate; end;end; 千分散尽还复来,天天接分必有用…… 多线程中哪些变量需要同步 CXGRID 中 怎么实现混合选 谁知道这个软件使用什么语言?如何封装的? 怎样取得某个文件的路径名? proc(a:array of string) 和proc(const a:array of string)有区别吗? 为什么?事件setText没有响应呢. 如何创建一个圆形窗体,怎么运行的时候出不来呢!急急急急!!! 我还很菜,请教文本过滤问题 操作系统不同,为什么字体显示不一样?怎样解决这个问题? 关于delphi中键盘输入的问题 请教indy10的IdFTP的一个问题
///
/// </summary>
/// <param name="Handle">控件句柄 </param>
/// <param name="Value">TAlignment类型的值 </param>
procedure SetAlignment(const Handle: THandle; const Value: TAlignment);
var
style: DWORD;
begin
if FAlignment <> Value then
begin FAlignment := Value;
Style := GetWindowLong(Handle, GWL_STYLE);
style := style and (not ES_LEFT) and (not ES_CENTER) and (not ES_RIGHT);
case FAlignment of
taLeftJustify: SetWindowLong(Handle, GWL_STYLE, style or ES_LEFT);
taRightJustify: SetWindowLong(Handle, GWL_STYLE, style or ES_RIGHT);
taCenter: SetWindowLong(Handle, GWL_STYLE, style or ES_CENTER);
end;
Invalidate;
end;
end;