tooltip 在数据窗口中的用法,该如何解决
发布时间:2011-06-29 20:20:13 文章来源:www.iduyao.cn 采编人员:星星草
tooltip 在数据窗口中的用法
Long ii_dwID
inv_Tooltip.of_SetMaxWidth( 1500 )
inv_Tooltip.of_SetTipTitle( inv_Tooltip.TTI_INFO, ls_Roomno )
ii_dwID = inv_ToolTip.of_AddTool(dw_4, "" , 0 )
inv_Tooltip.of_SettipText( This, ii_dwID, '测试aaa' )
我在Clicked 或者 自定义 pbm_mousemove 事件.当我点一下的时候不会弹出信息.总是要再移动一下鼠标才能弹出信息出来
------解决方案--------------------
看一下你的of_setiptext是怎么写的?
或者单步跟踪一下
如果你用的是pb11以上的版本,数据窗口的列有tip属性,设置即可
------解决方案--------------------
有数据窗口tip示例,如果需要可发至邮箱
------解决方案--------------------
forward
global type n_cst_dwsrv_autohint from nonvisualobject
end type
type logfont from structure within n_cst_dwsrv_autohint
end type
type textsize from structure within n_cst_dwsrv_autohint
end type
end forward
type logfont from structure
long lfHeight
long lfWidth
long lfEscapement
long lfOrientation
long lfWeight
character lfItalic
character lfUnderline
character lfStrikeOut
character lfCharSet
character lfOutPrecision
character lfClipPrecision
character lfQuality
character lfPitchAndFamily
string lfFaceName
end type
type textsize from structure
long l_cx
long l_cy
end type
global type n_cst_dwsrv_autohint from nonvisualobject
event type long ue_mousemove ( unsignedlong flags, integer xpos, integer ypos )
event type long resize ( unsignedlong sizetype, integer newwidth, integer newheight )
end type
global n_cst_dwsrv_autohint n_cst_dwsrv_autohint
type prototypes
FUNCTION ulong GetDC(ulong hwnd) LIBRARY "user32.dll"
FUNCTION ulong ReleaseDC(ulong hwnd,ulong hdc) LIBRARY "user32.dll"
FUNCTION ulong SelectObject(ulong hdc,ulong hObject) LIBRARY "gdi32.dll"
FUNCTION ulong DeleteObject(ulong hObject) LIBRARY "gdi32.dll"
FUNCTION ulong CreateFontIndirect(ref LOGFONT lpLogFont) LIBRARY "gdi32.dll" ALIAS FOR "CreateFontIndirectA"
FUNCTION ulong GetTextExtentExPoint(ulong hdc,ref string lpszStr,ulong cchString,ulong nMaxExtent,ref ulong lpnFit,ref ulong alpDx,ref textSIZE lpSize) LIBRARY "gdi32.dll" ALIAS FOR "GetTextExtentExPointA"
FUNCTION ulong GetTextExtentPoint32(ulong hdc,ref string lpsz,ulong cbString,ref textSIZE lpSize) LIBRARY "gdi32.dll" ALIAS FOR "GetTextExtentPoint32A"
Function long MulDiv (long nNumber, long nNumerator, long nDenominator) Library "KERNEL32.DLL"
FUNCTION ulong GetDeviceCaps(ulong hdc,ulong nIndex) LIBRARY "gdi32.dll"
end prototypes
type variables
Private:
DataWindow idw_requestor
nvo_tooltips ToolTip
String is_prior_dwo
end variables
forward prototypes
public function long of_gettextwidth (string as_colname, string as_text)
public subroutine of_replacestring (ref string as_src, string as_oldstr, string as_newstr)
public function integer of_setrequestor (datawindow adw_requestor)
end prototypes
event type long ue_mousemove(unsignedlong flags, integer xpos, integer ypos);String ls_dwo,ls_col,ls_text
Long ll_row
Int li_pos
ls_dwo = idw_requestor.GetObjectAtPointer()
If is_prior_dwo = ls_dwo Then
Return 0
Else
is_prior_dwo = ls_dwo
End If
If Tooltip.tipvisible() or flags <> 0 Then
Tooltip.hidetip(idw_requestor)
end if
li_pos = Pos(ls_dwo, "~t")
If li_pos <= 0 Then Return 0
ls_col = Left (ls_dwo, li_pos - 1 )
ll_row = Long(Mid(ls_dwo,li_pos + 1 ))
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
其他相似内容:
-
pb里关于数据窗口继承的问题
我的pb里设了一个母数据窗口,规定了样式,颜色,怎么让其他数据窗口都继承这个母dw,不用重复设颜色,样式呢
...
-
如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
如何制作PB中查找的窗口,可以变透明的,而且还始终在最上面的窗口?
-...
-
powerbuilder 控件句柄转换,求教!!
问题:
比如我通过handle取得了一个button的句柄。
那么我能否根据这个句柄的值,又反操作还原这...
-
TAB控件能不能设置成不是3D的?
就类似于多行编辑控件的Border设置为false,变成平面的效果。找不到在哪里设置
------解决方案-----...
-
???新增按钮的问题
设置一个window窗口有个“新增”按钮,如何做出点击新增按钮,编号(varchar2类型)自动+1,点一下变成2,然后录完信息,再打开...
-
如何用回车键enter获得焦点
一个数据录入窗口,如何输完一个数据,按回车键跳到下一个要输入数据的地方 就和tab一样
------解决方案...
-
ole控件 Microsoft Web Browser
我用Microsoft Web Browser这个控件写了一个浏览器 但是不能运行脚本 对于那些需要在本地运行...
-
PB如何做透明的文本
我现在工作空间,应用程序,窗口都创建好了。也加了文本“用户名”,从网上看了要创建可视用户对象,粘贴了代码。但...
-
mdi窗口的sheet从normal变为max时闪烁
我的mdi的sheet默认打开后最大化,在sheet的resize事件中构造着把所有控件按比例伸缩,但每次...
-
如何使getfileopenname函数打开的窗口居中?
如何使getfileopenname函数打开的窗口居中?谢谢
------解决方案--------------------
...