TWPComboBoxes Comments and Questions

  • TWPComboBoxes Comments and Questions:

    1. Even when ComboBoxStyle is cbsPrinterFonts it does not render the fonts in their own style (will use my own control). Same with cbsStyleNames

    2. Why when ComboBoxStyle is cbsFontSizes does the combo style change to OwnerDrawFixed? It should be csDropDown so users can type a font size (c.f. MS Word)

    3. In your TBX demo where are the Styles being read from? I tried adding styles at designtime in the TWPStyleCollection object and they are ignored by the TWPComboBox showing cbsStyleNames


    Also, I modified the TBX demo to work with standard TTB2K controls (no other changes). In the original demo (included in wpdemo.exe) JPEG and BMP images will embed correctly, but in my demo (still calling WPRichText1.InsertGraphicDialog) they only show as a large area of blank space. Any suggestions?

    • Offizieller Beitrag

    Hi,

    I check if the comboboxes need some improvmet. Haven't looked at them for a while.

    You can however use Your own combo boxes without any problem. You onyl need to use the event OnCharacterAttrChange to update them. The code in WPActions.PAS will be a good example.

    There is also example code to render the styles in a combo box.

    Image support is in unit WPObj_Image. Unless this unit is added, there is no image support. Usually WPIO adds this unit. I also recommend to check out this unit (WpObj_Image) since the PNG support is activated there.

    Julian

  • I hadn't noticed this bit of code in the TBX demo. When i commented it out of course it worked correctly...

    procedure TWPTBXForm.WPRichText1TextObjectPaint(<snip>);
    begin
    ContinueMode := [];
    end;