Changeset 801 for cprs/branches/tmg-cprs/CPRS-Chart/fNotes.pas
- Timestamp:
- Jun 16, 2010, 8:23:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/branches/tmg-cprs/CPRS-Chart/fNotes.pas
r800 r801 180 180 btnTextColor: TSpeedButton; //kt 8/09 181 181 btnBackColor: TSpeedButton; //kt 8/09 182 btnImage: TSpeedButton; //kt 4/10 182 btnImage: TSpeedButton; 183 popupAddImage: TPopupMenu; 184 mnuSelectExistingImage: TMenuItem; 185 mnuAddNewImage: TMenuItem; //kt 4/10 183 186 procedure mnuChartTabClick(Sender: TObject); 184 187 procedure lstNotesClick(Sender: TObject); … … 289 292 procedure cbFontSizeChange(Sender: TObject); //kt 8/09 290 293 procedure btnImageClick(Sender: TObject); //kt 4/10 291 procedure popNoteMemoHTMLFormatClick(Sender: TObject); //kt 8/09 294 procedure popNoteMemoHTMLFormatClick(Sender: TObject); 295 procedure mnuAddNewImageClick(Sender: TObject); 296 procedure mnuSelectExistingImageClick(Sender: TObject); //kt 8/09 292 297 private 293 298 FNavigatingTab : Boolean; //Currently Using tab to navigate … … 401 406 //fImages, {//kt added 9-20-05} 402 407 fOptionsNotes, //kt 8/09 408 fImagePickExisting, //kt 6/16/10 403 409 rHTMLTools, fImages, UploadImages; {//kt added 5-27-05 for IsHTMLDocument} 404 410 … … 4640 4646 procedure TfrmNotes.btnImageClick(Sender: TObject); 4641 4647 //kt added function 4648 begin 4649 if frmImages.ImagesCount > 0 then begin 4650 popupAddImage.Popup(Mouse.CursorPos.X, Mouse.CursorPos.Y); 4651 //Will allow user to : 4652 // Cancel, or trigger mnuAddNewImageClick or mnuSelectExistingImageClick 4653 end else begin 4654 mnuAddNewImageClick(self); 4655 end; 4656 end; 4657 4658 procedure TfrmNotes.mnuAddNewImageClick(Sender: TObject); 4659 //kt added function 4642 4660 var 4643 4661 i, AddResult: integer; … … 4656 4674 end; 4657 4675 end; 4676 4677 procedure TfrmNotes.mnuSelectExistingImageClick(Sender: TObject); 4678 //kt added function 4679 var 4680 oneImage: string; 4681 ImageFName : string; 4682 begin 4683 inherited; 4684 frmImagePickExisting := TfrmImagePickExisting.Create(Self); 4685 if frmImagePickExisting.ShowModal = mrOK then begin 4686 ImageFName := frmImagePickExisting.SelectedImageFName; 4687 if ImageFName <> '' then begin 4688 if frmImages.ThumbnailIndexForFName(ImageFName) = IMAGE_INDEX_IMAGE then begin 4689 oneImage := '<img src="'+ ImageFName + '" ' + ALT_IMG_TAG_CONVERT + ' >'; 4690 end else begin 4691 oneImage := '<embed src="'+ ImageFName + '" ' + ALT_IMG_TAG_CONVERT + ' >'; 4692 end; 4693 HTMLEditor.InsertHTMLAtCaret(oneImage+#13#10); 4694 end; 4695 end; 4696 FreeAndNil(frmImagePickExisting); 4697 end; 4698 4658 4699 4659 4700 procedure TfrmNotes.btnCenterAlignClick(Sender: TObject); … … 4849 4890 end; 4850 4891 4892 4893 4851 4894 initialization 4852 4895 uPCEEdit := TPCEData.Create;
Note:
See TracChangeset
for help on using the changeset viewer.