Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 388589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:47:03+00:00 2026-05-12T15:47:03+00:00

i get an Access Violation if i try to change the ribbon style using

  • 0

i get an Access Violation if i try to change the ribbon style using a TRibbonCombobox.

then, i modified the delphi ribbon demo to provide a combobox method to set the style:

  1. added a TRibbonCombobox on the ribbon bar
  2. added an event handler

here is the event code:

procedure TfrmRibbonDemo.RibbonComboBox1Change(Sender: TObject);

begin

  if RibbonComboBox1.Text='Luna' then

    Ribbon1.Style:=RibbonLunaStyle

    else

    Ribbon1.Style:=RibbonSilverStyle;

end;

when i change the style (especially more than once) with the TRibbonCombobox, i get:

date/time         : 2009-10-02, 11:11:29, 843ms
operating system  : Windows XP Service Pack 3 build 2600
physical memory   : 583/2047 MB (free/total)
free disk space   : (C:) 71.72 GB
display mode      : 1280x1024, 32 bit
allocated memory  : 23.59 MB
executable        : RibbonDemo.exe
exec. date/time   : 2009-10-02 11:11
compiled with     : Delphi 2009
madExcept version : 3.0k
exception class   : EAccessViolation
exception message : Access violation at address 0054767C in module 'RibbonDemo.exe'. Read of address 0000005F.

main thread ($ed0):
0054767c +054 RibbonDemo.exe RibbonActnCtrls           TCustomRibbonComboBox.SetBounds
00546e52 +0a2 RibbonDemo.exe RibbonActnCtrls           TRibbonComboControl.SetBounds
00516f39 +0f1 RibbonDemo.exe ActnMan                   TCustomActionControl.CalcBounds
0051853d +005 RibbonDemo.exe ActnCtrls                 TCustomButtonControl.CalcBounds
00546482 +00a RibbonDemo.exe RibbonActnCtrls           TRibbonComboControl.CalcBounds
00516754 +030 RibbonDemo.exe ActnMan                   TCustomActionControl.SetSpacing
0051a243 +01b RibbonDemo.exe ActnCtrls                 TCustomActionToolBar.CreateControl
00557f16 +01a RibbonDemo.exe Ribbon                    TCustomActionControlBar.CreateControl
0056205a +006 RibbonDemo.exe Ribbon                    TCustomRibbonGroup.CreateControl
0051243f +087 RibbonDemo.exe ActnMan                   TCustomActionBar.CreateControls
00519b35 +005 RibbonDemo.exe ActnCtrls                 TCustomActionDockBar.CreateControls
0051a2c6 +022 RibbonDemo.exe ActnCtrls                 TCustomActionToolBar.CreateControls
00557fcb +027 RibbonDemo.exe Ribbon                    TCustomActionControlBar.CreateControls
00562075 +005 RibbonDemo.exe Ribbon                    TCustomRibbonGroup.CreateControls
00514542 +05e RibbonDemo.exe ActnMan                   TCustomActionBar.RecreateControls
0050e081 +04d RibbonDemo.exe ActnMan                   TCustomActionManager.SetStyle
0055dac3 +02f RibbonDemo.exe Ribbon                    TCustomRibbon.SetStyle
0056720c +04c RibbonDemo.exe RibbonDemoMainForm 387 +3 TfrmRibbonDemo.RibbonComboBox1Change

if i make a style change with a button on the ribbon bar, it works fine.

thank you for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T15:47:03+00:00Added an answer on May 12, 2026 at 3:47 pm

    You are modifying the styles of the ribbon, which also modifies the combobox that triggers the event.

    In order for this to work, a programming interface must be “re-entrant”, and the ribbon system obviously isn’t.

    There are several possible solutions:

    • Do not modify the ribbon from a ribbon, move the configuration GUI to somewhere else.
    • Make the combobox store the desired action somewhere and trigger another event that will be executed after the termination of your combobox event. For instance, you can set a TTimer with a very small interval (1), and then enable that timer in the combobox event, so that when the TTimer event is fired, the ribbon system can be modified according to the new choice without requiring a reentrant api.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get access to the iTunes tags in an RSS feed using
Is it possible to get access to the spell checker that is incorporated in
I'm trying to get access to a form and its elements. The form is
I get an Access is Denied error message when I use the strong name
How can I get programmatic access to the call stack?
How do I get ms-access to connect (through ODBC) to an ms-sql database as
I'm trying to delete several working copy directories, but I get an Access Denied
I need to get a log of user access to our SQL Server so
How can I get the BSSID / MAC (Media Access Control) address of the
I want with ant access a subversion-repository and get a list of files available

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.