Changeset 460 for cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas
- Timestamp:
- Jul 6, 2008, 8:20:14 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/foia-cprs/CPRS-Lib/ORCtrls.pas
r459 r460 26 26 FOnEnter: TNotifyEvent; 27 27 FOnExit: TNotifyEvent; 28 protected29 30 28 published 31 29 property OnEnter: TNotifyEvent read FOnEnter write FOnEnter; … … 543 541 property OnSynonymCheck: TORSynonymCheckEvent read GetOnSynonymCheck write SetOnSynonymCheck; 544 542 property CharsNeedMatch: integer read FCharsNeedMatch write SetNumForMatch; 543 {UniqueAutoComplete Was added as a result of the following defects: 544 7293 - PTM 85: Backspace and Dosage: Desired dosage does not populate if dosage is not in local dosage field 545 7337 - PTM 160 Meds: #8 IMO - Simple - Change Order in which Error generated if "Enter" is hit instead of "OK" 546 7278 - PTM 36 Meds: Select 40000 UNT/2ML and backspace to 4000 the dose selected remains 40000 547 7284 - Inconsistencies of pulling in a dose from the Possible Dose File } 545 548 property UniqueAutoComplete: Boolean read FUniqueAutoComplete write SetUniqueAutoComplete default False; 546 549 end; … … 898 901 TCaptionListBox = class(TListBox) 899 902 private 903 FHoverItemPos: integer; 900 904 FAccessible: IAccessible; 901 905 FRightClickSelect: boolean; // When true, a right click selects teh item 906 FHintOnItem: boolean; 902 907 procedure SetCaption(const Value: string); 903 908 function GetCaption: string; 904 909 procedure WMGetObject(var Message: TMessage); message WM_GETOBJECT; 905 910 procedure WMRButtonUp(var Message: TWMRButtonUp); message WM_RBUTTONUP; 911 procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; 906 912 protected 907 913 FCaptionComponent: TStaticText; 914 procedure DoEnter; override; 908 915 public 909 916 procedure MakeAccessible( Accessible: IAccessible); … … 911 918 property RightClickSelect: boolean read FRightClickSelect write FRightClickSelect default FALSE; 912 919 property Caption: string read GetCaption write SetCaption; 920 //Make the ListBox's hint contain the contents of the listbox Item the mouse is currently over. 921 property HintOnItem: boolean read FHintOnItem write FHintOnItem default FALSE; 913 922 end; 914 923 … … 1440 1449 end; 1441 1450 1442 { ----------------------------------------------------- } 1451 { TORStaticText } 1452 1443 1453 procedure TORStaticText.DoEnter; 1444 1454 begin … … 1454 1464 FOnExit(Self); 1455 1465 end; 1456 1457 1466 1458 1467 { TORStrings } … … 2236 2245 //if Items.Count > 0 then SetFocusIndex(TopIndex); // this seems to cause problems 2237 2246 //Fix For ClearQuest: HDS00001576 2247 //This fix has been commented out, becuase it causes problems 2238 2248 { if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then 2239 2249 SetFocusIndex(TopIndex);//ItemIndex := TopIndex; } … … 3863 3873 //FEditBox.SelectAll; 3864 3874 //Fix For ClearQuest: HDS00001576 3865 {Commented out the fix for CQ: 1576, always selecing first item is 3866 causing issues.} 3875 //This fix has been commented out, becuase it causes problems 3867 3876 { with FListBox do 3868 3877 if (Items.Count > 0) and (Not IsAMouseButtonDown()) and (ItemIndex = -1) then … … 3872 3881 //Calling keyUp after key down creates a better mimic of a Keystroke. 3873 3882 FwdKeyUp(Self,key,[]); //fixes clearquest: HDS00001418 3874 end; }3883 end; } 3875 3884 inherited DoEnter; 3876 3885 PostMessage(Handle, UM_GOTFOCUS, 0, 0) … … 6476 6485 { TCaptionListBox } 6477 6486 6487 procedure TCaptionListBox.DoEnter; 6488 begin 6489 inherited; 6490 if HintOnItem then 6491 FHoverItemPos := -1; //CQ: 7178 & 9911 - used as last item index for ListBox 6492 end; 6493 6478 6494 function TCaptionListBox.GetCaption: string; 6479 6495 begin … … 6512 6528 else 6513 6529 inherited; 6530 end; 6531 6532 procedure TCaptionListBox.WMMouseMove(var Message: TWMMouseMove); 6533 var 6534 i : integer; 6535 begin 6536 inherited; 6537 //CQ: 7178 & 9911 - FHoverItemPos should be set to -1 in OnEnter 6538 //Make the TListBox's hint contain the contents of the listbox Item the mouse is currently over 6539 if HintOnItem then 6540 begin 6541 i := ItemAtPos(Point(Message.XPos, Message.YPos), true); 6542 if i <> FHoverItemPos then 6543 Application.CancelHint; 6544 if i = -1 then 6545 Hint := '' 6546 else 6547 Hint := Items[i]; 6548 FHoverItemPos := i; 6549 end; 6514 6550 end; 6515 6551 … … 6811 6847 6812 6848 end. 6813 6814 6815
Note:
See TracChangeset
for help on using the changeset viewer.