• I used to use the 'InsertGraphicAsLinkDialog' to insert image links in wpt4.

    Now I'm using the InsertGraphicDialog('dialog filter here',True(for linked));

    It seems to insert ok and all, but the image resizing is very strange.

    I select the image in the editor and try to size it smaller and it will arbitrarily change to a size other than what I had intended. For example, if I drag the right border to the left, to make the image less wide, sometimes the image will actually get wider, and may also resize itself vertically.


    Is this feature completed?

  • ok, after looking into it some more.

    I made a sample project and left everything default and it worked fine.

    It appears to have something to do with the AutoZoom setting, at least partly. If you leave this set to the default, wpAutoZoomOff, it seems the images resize like they should in the test project, and my project.

    If you set it to wpAutoZoomWidth, like mine was, you get this strange behavior. It seems to work ok like this in the test project, but not in my project. My settings are below, I couldn't find what might be causing it. Maybe you can see something I missed. I commented out all of my events and still got the same thing. I am using R6 by the way.

    If you set it to wpAutoZoomFullPage, you get an Exception(floating point div by 0). I get this even in basic test project. It comes from WPCTRMemo

    procedure TWPCustomRTFEdit.resize -->FMemo.ReorderPaintPages;

    I do like how it respects the aspect ratio if you drag from the corner handle.


    object WPRichText1: TWPRichText
    Left = 20
    Top = 241
    Width = 911
    Height = 454
    Header.DefaultPageHeight = 16838
    Header.DefaultTopMargin = 760
    Header.DefaultBottomMargin = 760
    Header.DefaultLeftMargin = 1440
    Header.DefaultRightMargin = 1882
    Header.DefaultMarginHeader = 0
    Header.DefaultMarginFooter = 0
    Header.LeftMargin = 1440
    Header.RightMargin = 1882
    Header.TopMargin = 760
    Header.BottomMargin = 760
    Header.MarginHeader = 254
    Header.MarginFooter = 254
    RTFVariables = <>
    OnChange = WPRichText1Change
    AutoZoom = wpAutoZoomWidth
    LayoutMode = wplayFullLayout
    ScrollBars = ssBoth
    EditOptions = [wpTableResizing, wpTableColumnResizing, wpObjectMoving, wpObjectResizingWidth, wpObjectResizingHeight, wpObjectResizingKeepRatio, wpObjectSelecting, wpObjectDeletion, wpSpreadsheetCursorMovement, wpActivateUndo, wpActivateUndoHotkey, wpMoveCPOnPageUpDown]
    ClipboardOptions = []
    ProtectedProp = [ppIsInsertpoint, ppIsMergedText]
    InsertPointAttr.Bold = tsIgnore
    InsertPointAttr.Italic = tsIgnore
    InsertPointAttr.DoubleUnderline = False
    InsertPointAttr.Underline = tsIgnore
    InsertPointAttr.StrikeOut = tsIgnore
    InsertPointAttr.StrikeOutColor = clBlack
    InsertPointAttr.SuperScript = tsIgnore
    InsertPointAttr.SubScript = tsIgnore
    InsertPointAttr.Hidden = False
    InsertPointAttr.UnderlineColor = clBlack
    InsertPointAttr.TextColor = clRed
    InsertPointAttr.BackgroundColor = clBlack
    InsertPointAttr.UseUnderlineColor = False
    InsertPointAttr.UseTextColor = True
    InsertPointAttr.UseBackgroundColor = False
    InsertPointAttr.HotEffectColor = clBtnFace
    HyperlinkTextAttr.Bold = tsIgnore
    HyperlinkTextAttr.Italic = tsIgnore
    HyperlinkTextAttr.DoubleUnderline = False
    HyperlinkTextAttr.Underline = tsTRUE
    HyperlinkTextAttr.StrikeOut = tsIgnore
    HyperlinkTextAttr.StrikeOutColor = clBlack
    HyperlinkTextAttr.SuperScript = tsIgnore
    HyperlinkTextAttr.SubScript = tsIgnore
    HyperlinkTextAttr.Hidden = False
    HyperlinkTextAttr.UnderlineColor = clBlue
    HyperlinkTextAttr.TextColor = clBlack
    HyperlinkTextAttr.BackgroundColor = clBlack
    HyperlinkTextAttr.UseUnderlineColor = True
    HyperlinkTextAttr.UseTextColor = False
    HyperlinkTextAttr.UseBackgroundColor = False
    HyperlinkTextAttr.HotUnderlineColor = clRed
    HyperlinkTextAttr.UseHotUnderlineColor = True
    HyperlinkTextAttr.HotTextColor = clRed
    HyperlinkTextAttr.UseHotTextColor = True
    HyperlinkTextAttr.HotUnderline = tsTRUE
    HyperlinkTextAttr.HotStyleIsActive = True
    BookmarkTextAttr.Bold = tsIgnore
    BookmarkTextAttr.Italic = tsIgnore
    BookmarkTextAttr.DoubleUnderline = False
    BookmarkTextAttr.Underline = tsTRUE
    BookmarkTextAttr.StrikeOut = tsIgnore
    BookmarkTextAttr.StrikeOutColor = clBlack
    BookmarkTextAttr.SuperScript = tsIgnore
    BookmarkTextAttr.SubScript = tsIgnore
    BookmarkTextAttr.Hidden = False
    BookmarkTextAttr.UnderlineColor = clGreen
    BookmarkTextAttr.TextColor = clBlack
    BookmarkTextAttr.BackgroundColor = clBlack
    BookmarkTextAttr.UseUnderlineColor = True
    BookmarkTextAttr.UseTextColor = False
    BookmarkTextAttr.UseBackgroundColor = False
    SPANObjectTextAttr.Bold = tsIgnore
    SPANObjectTextAttr.Italic = tsIgnore
    SPANObjectTextAttr.DoubleUnderline = False
    SPANObjectTextAttr.Underline = tsIgnore
    SPANObjectTextAttr.StrikeOut = tsIgnore
    SPANObjectTextAttr.StrikeOutColor = clBlack
    SPANObjectTextAttr.SuperScript = tsIgnore
    SPANObjectTextAttr.SubScript = tsIgnore
    SPANObjectTextAttr.Hidden = False
    SPANObjectTextAttr.UnderlineColor = clBlack
    SPANObjectTextAttr.TextColor = clBlack
    SPANObjectTextAttr.BackgroundColor = clBlack
    SPANObjectTextAttr.UseUnderlineColor = False
    SPANObjectTextAttr.UseTextColor = False
    SPANObjectTextAttr.UseBackgroundColor = False
    HiddenTextAttr.Bold = tsIgnore
    HiddenTextAttr.Italic = tsIgnore
    HiddenTextAttr.DoubleUnderline = False
    HiddenTextAttr.Underline = tsIgnore
    HiddenTextAttr.StrikeOut = tsIgnore
    HiddenTextAttr.StrikeOutColor = clBlack
    HiddenTextAttr.SuperScript = tsIgnore
    HiddenTextAttr.SubScript = tsIgnore
    HiddenTextAttr.Hidden = False
    HiddenTextAttr.UnderlineColor = clBlack
    HiddenTextAttr.TextColor = clBlack
    HiddenTextAttr.BackgroundColor = clBlack
    HiddenTextAttr.UseUnderlineColor = False
    HiddenTextAttr.UseTextColor = False
    HiddenTextAttr.UseBackgroundColor = False
    AutomaticTextAttr.Bold = tsIgnore
    AutomaticTextAttr.Italic = tsIgnore
    AutomaticTextAttr.DoubleUnderline = False
    AutomaticTextAttr.Underline = tsIgnore
    AutomaticTextAttr.StrikeOut = tsIgnore
    AutomaticTextAttr.StrikeOutColor = clBlack
    AutomaticTextAttr.SuperScript = tsIgnore
    AutomaticTextAttr.SubScript = tsIgnore
    AutomaticTextAttr.Hidden = False
    AutomaticTextAttr.UnderlineColor = clRed
    AutomaticTextAttr.TextColor = clRed
    AutomaticTextAttr.BackgroundColor = clWhite
    AutomaticTextAttr.UseUnderlineColor = True
    AutomaticTextAttr.UseTextColor = True
    AutomaticTextAttr.UseBackgroundColor = True
    AutomaticTextAttr.HotUnderlineColor = clRed
    AutomaticTextAttr.UseHotUnderlineColor = True
    AutomaticTextAttr.HotBackgroundColor = clWhite
    AutomaticTextAttr.UseHotBackgroundColor = True
    AutomaticTextAttr.HotTextColor = clRed
    AutomaticTextAttr.UseHotTextColor = True
    AutomaticTextAttr.HotStyleIsActive = True
    AutomaticTextAttr.HotEffectColor = clWhite
    ProtectedTextAttr.Bold = tsIgnore
    ProtectedTextAttr.Italic = tsIgnore
    ProtectedTextAttr.DoubleUnderline = False
    ProtectedTextAttr.Underline = tsIgnore
    ProtectedTextAttr.StrikeOut = tsIgnore
    ProtectedTextAttr.StrikeOutColor = clBlack
    ProtectedTextAttr.SuperScript = tsIgnore
    ProtectedTextAttr.SubScript = tsIgnore
    ProtectedTextAttr.Hidden = False
    ProtectedTextAttr.UnderlineColor = clBlack
    ProtectedTextAttr.TextColor = clBlack
    ProtectedTextAttr.BackgroundColor = clBlack
    ProtectedTextAttr.UseUnderlineColor = False
    ProtectedTextAttr.UseTextColor = False
    ProtectedTextAttr.UseBackgroundColor = False
    FieldObjectTextAttr.Bold = tsIgnore
    FieldObjectTextAttr.Italic = tsIgnore
    FieldObjectTextAttr.DoubleUnderline = False
    FieldObjectTextAttr.Underline = tsIgnore
    FieldObjectTextAttr.StrikeOut = tsIgnore
    FieldObjectTextAttr.StrikeOutColor = clBlack
    FieldObjectTextAttr.SuperScript = tsIgnore
    FieldObjectTextAttr.SubScript = tsIgnore
    FieldObjectTextAttr.Hidden = False
    FieldObjectTextAttr.UnderlineColor = clBlack
    FieldObjectTextAttr.TextColor = clBlack
    FieldObjectTextAttr.BackgroundColor = clBlack
    FieldObjectTextAttr.UseUnderlineColor = False
    FieldObjectTextAttr.UseTextColor = False
    FieldObjectTextAttr.UseBackgroundColor = False
    OnGetPageGapText = WPRichText1GetPageGapText
    OneClickHyperlink = False
    OnActivatingHotStyle = WPRichText1ActivatingHotStyle
    OnDeactivateHotStyle = WPRichText1DeactivateHotStyle
    Align = alClient
    ParentColor = False
    TabOrder = 3
    TabStop = True
    OnDragDrop = WPRichText1DragDrop
    OnDragOver = WPRichText1DragOver
    OnExit = WPRichText1Exit
    OnKeyDown = WPRichText1KeyDown
    OnKeyPress = WPRichText1KeyPress
    end