Where can I find the code that changes the comment button when there are comment lines, for example on the sales header,
into a comment button with lines ?
If you are talking about the pencil icon for the comments then it goes as follows:
The Icon is a picture box with sourceexpression Comment which is a flow field of table 36 leading to values True And False.Then at property BitmapList 7,6 , 7 being the FALSE and 6 being the TRUE...
I'm not sure if you are experiencing the same issue as we did or if you are looking to use this functionality somewhere else but....
We found it very hard to tell if a comment existed on a sales quote or order, simply because there was little difference in the true/false state of the bitmap.
Users were missing key comments all the time, simply because they didn't notice that a comment existed.
We renamed the original picture box 'CommentDoesNotExist' and added a 2nd picture box called 'CommentExists'.
We layered the 'CommentExists' picture box right underneath the 'CommentDoesNotExist' picture box (identical Bitmap, SourceExpr, XPos, YPos, Width, Height, etc.).
We then set the BackColor of the 'CommentExists' picture box to 6094847 (Bright Yellow).
Lastly, we added the following code to toggle the visible state of the two picture boxes.
Global Variable:
Name SalesComment
DataType Record
Subtype Sales Comment Line
Form - OnAfterGetRecord()
SalesComment.RESET;
SalesComment.SETRANGE("Document Type", "Document Type");
SalesComment.SETRANGE("No.", "No.");
IF SalesComment.FIND('-') THEN BEGIN
CurrForm.CommentExists.VISIBLE := TRUE;
CurrForm.CommentDoesNotExist.VISIBLE := FALSE;
END ELSE BEGIN
CurrForm.CommentExists.VISIBLE := FALSE;
CurrForm.CommentDoesNotExist.VISIBLE := TRUE;
END;
The default pencil (with no lines) bitmap is shown when there is no comment, but now the pencil (with lines) bitmap is surrounded by a bright yellow background which is very noticeable when a comment exists. We've enabled similar functionality in many other forms.
Comments
The Icon is a picture box with sourceexpression Comment which is a flow field of table 36 leading to values True And False.Then at property BitmapList 7,6 , 7 being the FALSE and 6 being the TRUE...
Thx
You can also do the same thing for option fields...
I'm not sure if you are experiencing the same issue as we did or if you are looking to use this functionality somewhere else but....
We found it very hard to tell if a comment existed on a sales quote or order, simply because there was little difference in the true/false state of the bitmap.
Users were missing key comments all the time, simply because they didn't notice that a comment existed.
We renamed the original picture box 'CommentDoesNotExist' and added a 2nd picture box called 'CommentExists'.
We layered the 'CommentExists' picture box right underneath the 'CommentDoesNotExist' picture box (identical Bitmap, SourceExpr, XPos, YPos, Width, Height, etc.).
We then set the BackColor of the 'CommentExists' picture box to 6094847 (Bright Yellow).
Lastly, we added the following code to toggle the visible state of the two picture boxes.
Global Variable:
Name SalesComment
DataType Record
Subtype Sales Comment Line
The default pencil (with no lines) bitmap is shown when there is no comment, but now the pencil (with lines) bitmap is surrounded by a bright yellow background which is very noticeable when a comment exists. We've enabled similar functionality in many other forms.
I hope this helps.
Property...
BitmapList=7,c:\notes.bmp
Where C:\Notes.bmp is something New and more visible
Once compiled, it's set in Nav!
http://www.BiloBeauty.com
http://www.autismspeaks.org
Very nice!! That's an excellent tip.