trichview.support
Re: Create Hypertext to call Forms |
Author |
Message |
Diogo |
Posted: 05/05/2005 17:30:56 Sergey, very goooood ! :)) my function.GetFieldStyleNo is modified to: ..................................................... function TForm1F.GetFieldStyleNo(Jump:Boolean):Integer; var fi: TFontInfo; begin fi := TFontInfo.Create(nil); fi.Assign(RVStyle1.TextStyles[RichViewEdit1.CurTextStyleNo]); // I modified here if Jump = true then begin fi.Jump := True; fi.JumpCursor := crHandPoint; end; fi.Protection := [rvprStyleProtect, rvprModifyProtect, rvprConcateProtect, rvprDoNotAutoSwitch]; Result := RVStyle1.TextStyles.FindSuchStyle(0, fi, RVAllFontInfoProperties); if(Result < 0)then begin Result := RVStyle1.TextStyles.Count; RVStyle1.TextStyles.Add; RVStyle1.TextStyles[Result].Assign(fi); RVStyle1.TextStyles[Result].Standard := False; end; end; .....................................................
Sergey, but I still have 2 problems: FIRST I insert using the function.GetFieldStyleNo to Jump field so: RichViewEdit1.CurTextStyleNo := GetFieldStyleNo(True); // Jump=True RichViewEdit1.InsertStringTag(EdtCustomerCODE.Text, Integer(StrNew(PChar(EdtCustomerNAME.Text)))); Table1.Insert; Table1.FieldByName('CODE').AsString := EdtCustomerCODE.text; Table1.FieldByName('NAME').AsString := EdtCustomerNAME.text; Table1.Post; The problem is: when I insert a field using the function above, onde record is inserted in my Table1. I need that when deleting the field of my Dbrichviewedit, also excludes the register of the table automatically. How make this? SECOND I use DBRichViewEdit with "rvActions" The default code for the RichViewEdit.Onjump is: procedure TForm3.RichViewEdit1Jump(Sender: TObject; id: Integer); begin rvActionsResource.rvActionInsertHyperlink1.GoToLink(RichViewEdit1, id); end; the Onjump event does not function if I correctly to place the function that you passed: procedure TForm3.RichViewEdit1Jump(Sender: TObject; id: Integer); var Code: String; RVData: TCustomRVFormattedData; ItemNo: Integer; begin rvActionsResource.rvActionInsertHyperlink1.GoToLink(RichViewEdit1, id); // the new function: RichViewEdit1.GetJumpPointLocation(id, RVData, ItemNo); Code := PChar(RVData.GetItemTag(ItemNo)); Table1.Findkey([Code]); end; how to make so that the two functions work correctly? thanks Diogo |
Powered by ABC Amber Outlook Express Converter