Change color (or other properties) when you move the mouse over the data window

Source: Internet
Author: User
Change the color (or other properties) when you move the mouse over the data window (user HHCF)

User: HHCF email:smartfan@8848.net

The following instance variables are defined first in the window where the data window is located:
String Is_header,is_detail
Boolean Ib_color//The height of the header and detail of the Data window in the window open event is used for the next calculation:
Is_header = Dw_1.Object.DataWindow.header.height
Is_detail = dw_1.Object.DataWindow.detail.height//The number window defines a MouseMove user event and writes the following script:
int Li_currentno,li_rowno string Ls_firstno/////The first row number variable shown in the current number of Windows with Firstrowonpage must be defined as a character type
If Ib_color is false, modify the field color expression (assuming red instead).Note: 0 and if in an expression must be tab-delimited and set Ib_color to True
IF not Ib_color THEN
Dw_1.object.columnname.color = "0 if (currentrow () = GetRow (), RGB (255,0,0), RGB (0,0,0))"
...
Ib_color = True
End IF//Fetch Data window The cursor is in the current display row
Li_currentno = (ypos + integer (is_header))/integer (Is_detail)//Fetch the actual line number of the first row in the current display row of the data window
Ls_firstrow = dw_1.Object.DataWindow.FirstRowOnPage//calculates the actual line number (that is, the record number) of the line where the cursor is located
Li_rowno = Integer (ls_firstrow) + li_currentno-1//Set the row as the current row, making the field color-changing according to the condition
Dw_1.setrow (LI_ROWNO)///In window MouseMove event changes the field back to its original color (assumed to be black) and sets the Ib_color to false:
Dw_1.object.columnname.color = RGB (0,0,0)
...
Ib_color = False

With this method, you can make similar modifications to other properties of the Data window field. Passed in the pb6.0 test. Please correct me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.