WPCubed Product Support

Font (-size) selection by combobox without action property

Hi !

I resently got the TMS VCL subscription. Nice components and a very nice looking office 2007 like menu.
The problem that I have is the missing action property for the combo boxes within the TMS menu.

Could you give me a little piece of code showing the following, please?

  • show font name from cursorposition in fontcombo
  • change font if text is selected and fontcombo is changed
  • same for fontsize

Thx a lot!

#1 ♥ 0
4k Views 2 users read 1 min

I use DevEx components for the font name and size combos.

This is my code in the OnSelectionChanged event.

frmReport.dxBarFontNameCombo1.Text :=  WPRichText1.CurrAttr.FontName;  frmReport.dxBarComboFontSize.CurText := inttostr(Trunc(WPRichText1.CurrAttr.Size));

For setting the font from the font combo I have the following in the combo OnCloseUp event.

RichText.CurrAttr.FontName := dxBarFontNameCombo1.CurText;

HTH.

Rob

#2 ♥ 0
This category is archived. No new posts are possible.