Changeset 1679 for cprs/trunk/CPRS-Chart/Orders/fODLab.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fODLab.pas
r829 r1679 6 6 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 7 7 Forms, Dialogs, StdCtrls, ORCtrls, ORfn, fODBase, ExtCtrls, ComCtrls, uConst, 8 ORDtTm, Buttons, Menus, VA508AccessibilityManager ;8 ORDtTm, Buttons, Menus, VA508AccessibilityManager, VA508AccessibilityRouter; 9 9 10 10 type … … 57 57 MessagePopup: TPopupMenu; 58 58 ViewinReportWindow1: TMenuItem; 59 Frequencylbl508: TVA508StaticText; 60 HowManyDayslbl508: TVA508StaticText; 61 specimenlbl508: TVA508StaticText; 62 CollSamplbl508: TVA508StaticText; 59 63 procedure FormCreate(Sender: TObject); 60 64 procedure ControlChange(Sender: TObject); … … 107 111 procedure ReadServerVariables; 108 112 procedure DisplayChangedOrders(ACollType: string); 113 procedure setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl; lbl2: string); 109 114 public 110 115 procedure SetupDialog(OrderAction: Integer; const ID: string); override; … … 206 211 procedure TfrmODLab.FormCreate(Sender: TObject); 207 212 var 208 i, n : integer;213 i, n, HMD508: integer; 209 214 AList: TStringList; 210 215 begin … … 263 268 if cboAvailTest.Items.Count > 0 then cboAvailTest.InsertSeparator; 264 269 cboAvailTest.InitLongList(''); 270 //TDP - CQ#19396 HMD508 added to guarantee 508 label did not change width 271 HMD508 := HowManyDayslbl508.Width; 265 272 SetControl(cboFrequency, 'Schedules'); 273 HowManydayslbl508.Width := HMD508; 266 274 with cboFrequency do 267 275 begin … … 271 279 lblHowManyDays.Enabled := False; { have this call change event in case } 272 280 txtDays.Enabled := False; { the default is not 'one time'? } 281 //TDP - CQ#19396 Following line does not appear to be needed 282 //setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption); 273 283 end; 274 284 if EvTDelayLoc>0 then … … 283 293 Font.Color := clGrayText; 284 294 lblFrequency.Enabled := False; 295 setup508Label(Text, Frequencylbl508, cboFrequency, lblFrequency.Caption); 285 296 end; 286 297 PreserveControl(cboAvailTest); … … 294 305 AList.Free; 295 306 end; 307 end; 308 309 {TDP - CQ#19396 Added to address 508 related changes. I modified slightly to 310 change lbl.Caption and retain lbl.Width} 311 procedure TfrmODLab.setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl; lbl2: string); 312 var 313 Width: integer; 314 begin 315 if ScreenReaderSystemActive and not ctrl.Enabled then begin 316 lbl.Enabled := True; 317 lbl.Visible := True; 318 Width := lbl.Width; 319 lbl.Caption := lbl2 +'. Read Only. Value is ' + Text; 320 lbl.Width := Width; 321 end else 322 lbl.Visible := false; 296 323 end; 297 324 … … 745 772 procedure TLabTest.LoadUrgency(CollType: string; AComboBox:TORComboBox); 746 773 var 747 i: integer; 774 i, PreviousSelectionIndex: integer; 775 PreviousSelectionString: String; 748 776 begin 749 777 with AComboBox do 750 778 begin 779 PreviousSelectionIndex := -1; 780 PreviousSelectionString := SelText; 781 751 782 Clear; 752 for i := 0 to UrgencyList.Count - 1 do 783 for i := 0 to UrgencyList.Count - 1 do begin 753 784 if (CollType = 'LC') and (Piece(UrgencyList[i], U, 3) = '') then 754 785 Continue 755 786 else 756 787 Items.Add(UrgencyList[i]); 788 if (PreviousSelectionString <> '') and (PreviousSelectionString = Piece(UrgencyList[i], U, 2)) then 789 PreviousSelectionIndex := i; 790 end; 791 757 792 if (LRFURG <> '') and (ALabTest.ObtainUrgency) then 758 793 SelectByID(LRFURG) 794 else if PreviousSelectionIndex > -1 then 795 ItemIndex := PreviousSelectionIndex 759 796 else 760 797 SelectByIEN(uDfltUrgency); … … 1292 1329 lblCollSamp.Enabled := True; 1293 1330 cboCollSamp.Enabled := True; 1331 //TDP - CQ#19396 Added cboCollSamp 508 changes 1332 setup508Label(cboCollSamp.Text, collsamplbl508, cboCollSamp, lblCollSamp.Caption); 1294 1333 end 1295 1334 else … … 1306 1345 lblCollSamp.Enabled := False; 1307 1346 cboCollSamp.Enabled := False; 1347 //TDP - CQ#19396 Added cboCollSamp 508 changes 1348 setup508Label(cboCollSamp.Text, collsamplbl508, cboCollSamp, lblCollSamp.Caption); 1308 1349 end; 1309 1350 if ObtainSpecimen then … … 1311 1352 lblSpecimen.Enabled:= True; 1312 1353 cboSpecimen.Enabled:= True; 1354 setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption); 1313 1355 end else 1314 1356 begin 1315 1357 lblSpecimen.Enabled:= False; 1316 1358 cboSpecimen.Enabled:= False; 1359 setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption); 1317 1360 end; 1318 1361 if ObtainUrgency then … … 1360 1403 lblSpecimen.Enabled:= True; 1361 1404 cboSpecimen.Enabled:= True; 1405 setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption); 1362 1406 end else 1363 1407 begin 1364 1408 lblSpecimen.Enabled:= False; 1365 1409 cboSpecimen.Enabled:= False; 1410 setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption); 1366 1411 end; 1367 1412 if ObtainComment then … … 1419 1464 procedure TfrmODLab.cboFrequencyChange(Sender: TObject); 1420 1465 var 1421 x : string;1466 x, HowManyText: string; 1422 1467 const 1423 1468 HINT_TEXT1 = 'Enter a number of days'; … … 1434 1479 txtDays.Hint := ''; 1435 1480 txtDays.Enabled := True; 1481 //TDP - txtDays 508 changes 1482 if txtDays.Text = '' then HowManyText := 'no value' 1483 else HowManyText := txtDays.Text; 1484 setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption); 1436 1485 txtDays.Showhint := True; 1437 1486 end … … 1441 1490 lblHowManyDays.Enabled := False; 1442 1491 txtDays.Enabled := False; 1492 //TDP - txtDays 508 changes 1493 HowManyText := 'no value'; 1494 setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption); 1443 1495 txtDays.ShowHint := False; 1444 1496 end; … … 2025 2077 2026 2078 end. 2027 2028
Note:
See TracChangeset
for help on using the changeset viewer.