delphi button 实现下拉列表
unit Unit1; interface uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus, StdCtrls; type
TForm1 = class(TForm)
Button1: TButton;
PopupMenu1: TPopupMenu;
fgh1: TMenuItem;
drg1: TMenuItem;
dg1: TMenuItem;
procedure Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1; implementation {$R *.dfm} procedure TForm1.Button1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
pt:TPoint;
begin
GetCursorPos(pt);
PopupMenu1.Popup((pt.x-x),(pt.y+(Button1.Height-y))); end; end.
简单的一种下拉列表
delphi button 实现下拉列表的更多相关文章
- dhtmlx中添加一列(将相似button、下拉列表、输入框显示在一行上)
{ type: "label", list: [ { { type: "label", labelWidth: 55 }, { type: "newc ...
- delphi自动调整combobox下拉列表宽度(PostMessage CB_SETDROPPEDWIDTH)
在combobox所在的窗口的Formshow事件里调用即可 procedure SetComboBoxListWidth( AComboBox: TComboBox ); var i: Intege ...
- Delphi Button组件
- Bootstrap之样式风格与下拉菜单
背景颜色 bg-primary 字体颜色 text-primary 文字居中 text-center 按钮 btn btn-primary btn-default默认 btn-link链接 按钮大小 ...
- 【HTML5 1】39个让你受益的HTML5教程
闲话少说,本文作者为大家收集了网上学习HTML5的资源,期望它们能够帮助大家更好地学习HTML5. 好人啊! 只是,作者原来说的40个仅仅有39个,由于第5个和第8个是反复的. 原文在此! 1. 五分 ...
- 39一个可以让你受益HTML5课程
事不宜迟,本文作者是我们收集的在线学习HTML5资源.我们希望他们能够帮助你更好地学习HTML5. 不错啊! 只,说原作者40一个只有39一.由于第一5钍和8一是重复. 原文在此! 1. 五分钟入门H ...
- Vuex原来可以这样上手
在Mvc模式大行其道的今天,后端通过各种Mvc框架实现视图与数据模型的隔离,而前端这方面也发展迅速.vue实现了Dom与viewModel双向绑定,使其视图的更新影响模型,模型的更新影响视图,你会不会 ...
- 3.bootstrap-组件
1.图标 <button type="button" class="btn btn-default"> <span class="g ...
- YII用户注冊和用户登录(二)之登录和注冊在视图通过表单使用YII小物件并分析
2 登录和注冊在视图通过表单使用YII小物件并分析 <?php $form = $this -> beginWidget('CActiveForm', array( 'enableClie ...
随机推荐
- jenkins X实践系列(3) —— jenkins X 安装拾遗
jx是云原生CICD,devops的一个最佳实践之一,目前在快速的发展成熟中.最近调研了JX,这里为第3篇,介绍下如何安装jenkins x. 前置条件 安装K8S 安装ceph集群(jx需要stor ...
- Flink的容错
checkpoint介绍 checkpoint机制是Flink可靠性的基石,可以保证Flink集群在某个算子因为某些原因(如 异常退出)出现故障时,能够将整个应用流图的状态恢复到故障之前的某一状态,保 ...
- python--异常捕获
#异常捕获---指定异常类型 try: #尝试 fi=open(r'D:\Users\4399-3046\Desktop\test.txt',mode='wb'); fi.write('写入文字'); ...
- 微信获取地理位置转城市demo
<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js ...
- <%= %>、<% %>、<%@ %>和<%# %>的区别
轉至http://blog.csdn.net/wildfeng04/article/details/7290126 <%=%> 里面放的变量名 <% %> 中间一般放函数或者方 ...
- Linux下C语言的进程控制编程
代码: #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/ty ...
- jquery模拟form表单提交并新打开页面
/** * form表单提交本页面打开 * @param url * @param params */ function postCurrent(url,params){ var form = $(& ...
- CentOS 7 休眠系统
CentOS 7的电源按钮只有关机和重启两项,但是可以用命令来休眠系统: 重启: $ systemctl reboot 退出系统并停止电源: $ systemctl poweroff 待机: $ sy ...
- 2018 icpc 青岛网络赛 J.Press the Button
Press the Button Time Limit: 1 Second Memory Limit: 131072 KB BaoBao and DreamGrid are playing ...
- c++ stod很慢
C++ Convert String to Double Speed (There is also a string-to-int performance test.) A performance b ...