Beiträge von Soul

    I may have found a temporary solution to get the animation to work. What i have done so far is used the component GifImage and have placed a procedure called

    procedure OnGifPaint(Sender: TObject);

    then call TGifImage(Image1.Picture.Graphic).OnPaint := OnGifPaint

    and then WPTextObj := WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);

    in the OnGifPaint procedure just call
    WPTextObj.LoadObjFromGraphic(Image1.Picture.Graphic);

    so it would look something like this...

    public
    { Public declarations }
    procedure OnGifPaint(Sender: TObject);
    end;

    var
    Form1: TForm1;
    WPTextObj: TWPTextObj;
    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    with TOpenDialog.Create(Nil) do
    try
    If Execute then
    Image1.Picture.LoadFromFile(FileName);
    TGifImage(Image1.Picture.Graphic).OnPaint := OnGifPaint
    finally
    free;
    end;
    WPTextObj := WPRichText1.TextObjects.InsertCopy(Image1.Picture.Graphic);
    end;

    procedure TForm1.OnGifPaint(Sender: TObject);
    begin
    WPTextObj.LoadObjFromGraphic(Image1.Picture.Graphic);
    end;


    although this is messy and you would have to create a list or arrays to maintain each object its the best solution i have come up with so far

    although this is an old post, but ever since I have have had version 5 way back when, I have also wanted Animated gif's for display, has version 6 implemented this as of yet? I need to download it and find out if its not ill just have to wait... or maybe get a petition going lol just joking.

    Anyway's as i have stated in the past great component you have done a good job with it.

    Scott.

    If I hard code them items it wont auto grey out the items like it would normaly do, i guess i could hard code that as well, was just trying to save on code but thats ok.

    Do you think in the future you could implament a way to have it so you can use both ways so it doesnt delete the way it links? or is there a way i could change the source code to implament it?


    Thanks again for you help

    Julian thak you for your reply,

    I have located the problem when you link WPRichText to WPDefaultActions1.ControlledMemos it stops the actions working in the Popupmenu and i dont see away around it unless i dont link to ControlledMemos but then that stops the main menu working

    using latest version just updated 3 days ago

    Hi

    I am trying to use an actionlist with a popupmenu and im using the WPT_Edit's in the Action list, im using WPARedo1, WPAUndo1, WPACut1, WPAPaste1, and WPASelectAll1, I assign the popupmenu to WPRichText1 after linking the menues to the actionlist and then run the program, nothing happens, none of the items in the list work, is there something im doing wrong? or am i going about this the wrong way? any help on this matter would be greatly appreciated.

    Thank you.

    Scott.

    Hi,

    i have recently made changes to the WPToolBar by adding the wpShowSpellCheckSetup and wpShowSpellAsYouGo everything works fine except when i click the button with the wpShowSpellCheckSetup command it just dosent exacute the setup dialog for Addict 3.4.5 the SpellAsYouGo works fine and the CheckSpelling works fine but not the wpShowSpellCheckSetup

    he are the changes i have made to implement the new buttons
    Sel
    WPTbar.pass

    TWPTbIcon4 = (SelUndo, SelRedo, SelDeleteText, SelCopy, SelCut, SelPaste, SelSelAll, SelHideSel,
    SelFind, SelReplace, SelSpellCheck, SelSpellAsYouGo, SpellCheckSetup);

    .....................

    const
    TheButtonCount = 73;
    TheButtons: array[0..TheButtonCount] of TTbBtnSty =

    ......

    (n: 'WPI_SpellAsYouGo'; g: WPI_GR_Edit; c: WPI_CO_SpellAsYouGo; i: 'El'),
    (n: 'WPI_SPELLSETUP'; g: WPI_GR_Edit; c: WPI_CO_SpellCheckSetup; i: 'Em'), //<<not sure woot the last letters are but somthing was needed so i added my own

    .................................

    { Style Icons }
    if SelSpellAsYouGo in fsIntIcons4 then
    AddStyle(WPI_GR_Edit, WPI_CO_SpellAsYouGo);
    if SelSpellCheckSetup in fsIntIcons4 then
    AddStyle(WPI_GR_Edit, WPI_CO_SpellCheckSetup);

    the button is firing as i can test it through the procedure

    WPToolBar1IconSelection(Sender: TObject;
    var Typ: TWpSelNr; const str: String; const group, num, index: Integer);


    it shows up fine here but just will not auto execute the Setup any help on this matter would be greatly appreciated thanks

    Scott

    hello Julian

    im trying to create a WPrichtext from code inside a componet im creating, its all working fine except when in design state if i click on the WPrichtext i get the following AV

    Cannot focus a disabeld or invisible window

    i have WPrichtext readonly and with no caret and no selection

    i have tried disableing the get focus but stll no luck any idears or sulutions would be greatly appreciated,

    Thank you

    Scott

    Hi Julian,

    i have been trying to insert an animated gif image into WPRichText1

    i am using the code

    WPRichText1.TextObjects.InsertCopy(image1.Picture.Graphic);

    this works fine except the gif dose not animate unless i click on WPRichText1 and keep clicing or i use a timer with WPRichText1.RePaint;

    is there another way to make the gif animate by itself?

    thanks again Julian

    using V5.202

    Scott

    Julian,

    I have tried the
    WPRichText.Memo.DisableProtection;
    and
    WPRichText.Memo.EnableProtection;

    it disables the whole table and even the headings can be changed is there anyway i can change just a spercific tablerow in a table? as i dont want the user editing the column heading/title or the row undernieth that.

    also with the SetText Procedure how do i use that? im using
    WPR1.TableRow[1].cols[1].SetText('my text') and it keeps throwing an AV any help would be apreciated thanks,

    Scott

    Hi, just wondering how i go about disableing Protected text for a whole tablerow? like a specific tablerow number? not the whole table,

    Also how to add text to tablerow column? i have tryed

    WPR1.TableRow.Cols[1].ANSIText := Edit1.Text

    but this keeps returning an error any help would be greatly Appriceated thanks,


    Scott

    Hi. I was just wondering if there is a way to show no page breaks so that the whole document, which has more than one page to it, will look like just one long page rather than breaks in it.

    thanks

    Scott

    sorry Julian,
    I was a little tierd last night and forgot to add the post i know i said it was the first one but i was mistaken. By the way thank you for you time to answer my questions...

    here is the post again

    Great thak you have found that now and is working good thank you.

    now that i have that i seem to be getting an error with it, it's all readonly now including the picture but i seem to be getting an access violation if it is double clicked if dont have any properties or procedures set for any double click method but it seemd to be throwing and exception on WPRichText1 if its double click anywhere inside it is there any resion why this would be doing this or is there something i need to disable for this to stop it throwing the exception? thanks

    the error is Project Reading.exe raised exception class EAccessViolation with message 'Access Violation at adress 004aa63c in module 'Reading.exe'. Read of adress 00000000'.

    then Brings up the WPRTEDefs.pas and shows it stoped at

    RTFEngine.RePaint;

    in function TWPRTFDataCursor.SelectWord

    then it jumps to
    procedure TWPCustomRtfEdit.DoDblClick
    and stoping at
    FMemo.Cursor.SelectWord(FMemo.Cursor.active_paragraph, FMemo.Cursor.active_posinpar, true);

    im gathering its tring to select the text or object while in readonly mode wich in theory should not be aloud, so do i have to disable selection of text in one of the options or is there another way around this as i would still like to be able to select and copy test from it,

    Thnk you

    Scott.

    thanks Julian i just wasnt sure on it i just use WPTools in my project and wasnt sure if the WPRichtext and the labels and all that once compiled in my project was called the module i still have alot to learn about programmin and all these diffirent names for the diffirent parts of componets and stuff, this has made things clearer and i can safly intall the updated version thanks.

    by the way any info on my first question about the double clicking? or would that be fixed in the update? have never had a problem with your Product and think you have done a great job with it just hope there is a way around this or maybe im missing an option to turn off?
    The version im curently using is 5.18.6
    I am not sure on when ill put the updated version on as i like to think if it isnt broken dont fix it lol thanks again Julian

    Scott

    sorry Julian, its 5.18.6

    also just wondering ...

    i just seen through the forum there was a new version out and when i went to download it it says (the use in modules will invalidate distribution license!) does this mean i cannot distribute my program with the updated version ? as is now i can with the version i brought thanks again Julian,

    Scott

    Great thak you have found that now and is working good thank you.

    now that i have that i seem to be getting an error with it, it's all readonly now including the picture but i seem to be getting an access violation if it is double clicked if dont have any properties or procedures set for any double click method but it seemd to be throwing and exception on WPRichText1 if its double click anywhere inside it is there any resion why this would be doing this or is there something i need to disable for this to stop it throwing the exception? thanks

    the error is Project Reading.exe raised exception class EAccessViolation with message 'Access Violation at adress 004aa63c in module 'Reading.exe'. Read of adress 00000000'.

    then Brings up the WPRTEDefs.pas and shows it stoped at

    RTFEngine.RePaint;

    in function TWPRTFDataCursor.SelectWord

    then it jumps to
    procedure TWPCustomRtfEdit.DoDblClick
    and stoping at
    FMemo.Cursor.SelectWord(FMemo.Cursor.active_paragraph, FMemo.Cursor.active_posinpar, true);

    im gathering its tring to select the text or object while in readonly mode wich in theory should not be aloud, so do i have to disable selection of text in one of the options or is there another way around this as i would still like to be able to select and copy test from it,

    Thnk you

    Scott.

    Hello Julian,

    I have an image embeded into a rtf file i have WPRichText1 set to read only with no CR showing as i only want it to be read only the test in it is read only but the image in it is not, if i click on it it brings up the sizeable borders and then can have the size changed resized or even draged to a new location is there anyway to make the image read only and stay in the origonaly position like all the text is?

    Thank you,
    Scott.