Ticket T259670
Visible to All Users

Strange behavior when adding Rich Control in my application

created 10 years ago

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

Comments (1)

    I have same problem with fontname and fontsiize.

    Answers approved by DevExpress Support

    created 10 years ago (modified 10 years ago)

    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:

    Delphi
    procedure TRichViewDesignForm.beFontNameChange(Sender: TObject); begin //acFontName.Value := beFontName.EditValue; if IsWindowVisible(dxRichEditControl.Handle) then begin dxRichEditControl.SetFocus; acFontName.Value := beFontName.EditValue; end; end;
      Show previous comments (4)
      DevExpress Support Team 9 years ago

        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?

        MP MP
        Manolis Perrakis 9 years ago

          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

          DevExpress Support Team 9 years ago

            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.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.