Hi,
From the sample demo application of the RichText control I copied the forms in my application in a bpl package and after some minor changes I made it work. However I can't change the font size and font name of the selected text. All the other button work fine even the increase font size.
These 2 lists don't seem to work. I copied the new form with the changed code from my application and replaced the one from the sample and compiled it. It worked fine.
I Cannot understand why this happens. Any ideas?
I'm attaching a video of the behavior in my application (cannot change font name and size) and then the expected corrected behavior in the sample application with my changed form code.
Thanks,
Manolis
Strange behavior when adding Rich Control in my application
Answers approved by DevExpress Support
Hello,
In our demos we implemented special code to overcome the standard VCL actions' behavior. I mean the behavior when the standard TRichEdit control is not focused, actions do not work. I suggest that you first manually focus RichEditControl to make actions work because unlike bar buttons, such editors as FontComboBox take focus from RichEdit. You can use the bar item's OnChage event to overcome this problem. For example:
Delphiprocedure TRichViewDesignForm.beFontNameChange(Sender: TObject);
begin
//acFontName.Value := beFontName.EditValue;
if IsWindowVisible(dxRichEditControl.Handle) then
begin
dxRichEditControl.SetFocus;
acFontName.Value := beFontName.EditValue;
end;
end;
Hello,
Jeff is right. I have checked how the font changing functionality works in 15.2.2 and it seems to be OK. Moreover, we have implemented the capability to create the Ribbon UI for the Rich Edit Control automatically (the Generate Ribbon/Toolbar UI… option in the TdxRichEditControl's design-time popup menu). Thus, you do not need to assign actions manually anymore. If this approach works incorrectly in your project, would you please provide us with a small demo so we can find the cause of this issue?
Hi,
Sending you a sample project with an exe file included
Run project, press the button to open the new form write something and then try to change the font name and size with the combo boxes.
Thanks,
Manolis
Hello Manolis,
Thank you very much for your sample project. Indeed, even the automatically generated UI does not work outside the main form. I have created a separate ticket on your behalf: TdxRichEditControl and TdxSpreadSheet - Actions related to in-place editors does not work outside the main form , and forwarded it to our developers. I hope this issue will be fixed soon.
I have same problem with fontname and fontsiize.