Q:
I seem to get inconsistent behavior with my pointer over
text fields and datawindow string columns. Some I format as
hyperlinks and would like to set the pointer as a hyperlink
pointer, but it seems the datawindow setting doesn't work.
Sometimes I get a vertical bar and other times it's the
arrow.
Any tips on how to control this?
Thanks
Jay
A1:
Jay, you can use dw's Append HTML property for this:
Add the following in the Text/Column field's Append HTML property (for IE 6
and above):
style="cursor: pointer;"
For IE 5.5 and below:
style="cursor: hand;"
You can also use both the strings to support multiple browser:
style="cursor: pointer; cursor: hand;"
you can be creative and also use somthing like:
style="cursor: url('/img/pen_rm.cur')"
Arnd
A3:
I think you can deploy anything on the server in your /pbapp/ directory or
its subdirectory. You need to add (or replace) your files and directories to
the contents of "c:\Program Files\Sybase11\PowerBuilder
11.0\DotNET\webroot\" folder and deploy again. Thus way, I upload my
CSS-file along with xp.css and classic.css, and some other files. This
technique is suitable if you have just one web application. But what about
many...
Another way is to add those files in "Javascript files" tab - they will go
to pbapp directory, but this is not a good practice, because the generated
default.aspx file during deployment would contain buggy
links at its beginning. So it works really for javascript files only.
I've found another way to refer some image (! only) resource (deployed
through "Resource files" tab) from the application - pbopenfile.aspx. For
example,
if you want to show image resource in DW string column (or computed
field) using ValueIsHTML, you can use expressions like these:
'src="pbopenfile.aspx?t=0&o=1&e=0&c=pict%5cbackground_home.jpg" />'
'alt="Refresh list" style="cursor: pointer; cursor: hand;"
onMouseDown="this.style.marginTop=~'1px~';this.style.marginLeft=~'1px~'"
onMouseUp="this.style.marginTop=~'0px~';this.style.marginLeft=~'0px~'"
onMouseOver="this.style.marginTop=~'0px~';this.style.marginLeft=~'0px~'"
onMouseOut="this.style.marginTop=~'0px~';this.style.marginLeft=~'0px~'">'
they refer to pictures located in "pict" subdirectory of the deployed
application (so they'll go to pbapp_root\files\common... subfolders). For
PNG/BMP files there's an additional parameter passed to pbopenfile.aspx :
"f=png".
But these are experiments optained through IE & .net debugging etc. They
work for me, but I haven't found any official documentation for them. If
anyone has some docs, I'll be happy :-)
Ivaylo
Q:
Hi,Arul,if i want Text/Column's border,font to change when
mouseover/mouseout,how to assign dw's Append HTML property ?
and i need a tip when mouseover some objs,like button,pic ?
A:
To change the Border:
onmouseover="style.border='1px solid blue';"
onmouseout="style.border='0px';"
To change the Font:
onmouseover="style.fontFamily='courier';"
onmouseout="style.fontFamily='arial';"
.....
To add tip:
title="Hello World!"
RQ:
I tried this,and it worked Ok:
onmouseover= "style.border='1px outset ';style.cursor='hand';title='hello'"
onmouseout= "style.border='1px none';style.cursor='';"
I think maybe a CSS file can be used to work out all these issues?
why not sybase apply Append HTML property to text in windows not just
datawindow? window button need tooltips ,but no way to append html like
"title='some tips';"
A:
Regarding CSS usage - YES, it's possiblle to assign style on mouse
over/out/down/up. The main decision is in the way you use CSS file. So my
suggestion is:
1) create your own CSS-file containing your style definitions.
2) modify XP.CSS and CLASSIC.CSS files located in your "c:\Program
Files\Sybase11\PowerBuilder 11.0\DotNET\webroot" directory by adding @import
url("yourcustomfile.css"); in them. Put your custom file in the same
directory
3) redeploy your appl.
For sorrow, you cannot use "class=..." assignments in AppendHTML property of
the DW controls, because they already have some dynamically generated class
names (you may look in the generated HTML code for tags corresponding
to each DW column).
For window buttons you may use PictureButton or PictureHyperLink controls -
they has PowerTipText property which works in web.
Kind regards,
Ivaylo
阅读(2084) | 评论(2) | 转发(0) |