Toolbar created with class hides when calling mdi windows

Hi,

I have created a class inside my procedure that creates a toolbar at run time.

I recently noticed that when opening a window mdi (called using start(mymdiwindow,25000), it hides the created toolbar. Closing that mdi window will show the toolbar.

Am I missing something? I have absolutely no idea for now since I am new to creating class and it really helps me speed up my development.
Here is an example app
MySampleClass.zip (764.7 KB)

Thanks for helping me in advanced.

As far as I know, possibility to use the CREATE function to create a toolbar at run time was never announced. The Help file states that CREATE:Toolbar is just a modifier for the control type to instruct the RTL that the control must be created inside the toolbar rather than in the window’s client area. If you run your example program in C10 or in other previous CW versions, the toolbar is not creating.

There are several problems with creating toolbars and menubars at run time. For example, the NOMERGE property can’t be set for bars created inside MDI child windows. Toolbars and menubars have very different implementation in the future CW version, and CREATE for them will be allowed. The code in C11 uses implementation of statements from that future version to satisfy AnyScreen but support of CREATE to create toolbars and menubars is partial.

Declare the toolbar in the APPLICATION window with the HIDE attribute instead of CREATEing it at the run time. Just UNHIDE it when it’s required.

2 Likes

This makes sense, Thank you very much.

“Toolbars and menubars have very different implementation in the future CW version, and CREATE for them will be allowed.”

That would be fabulous …

There have been a number of information releases over the last few years on the new controls and GUI features… One hopes these are indeed coming soon.

The Accept loop in clarion is amazingly powerful allowing for GUI custom control even via macros… Its flexibility is amazing and would hate to see it replaced with anything else that is not as flexible.

New memory manager was ready in 2010.
New codepage/LCID-based implementation of the internationalization support was ready in 2013.
New implementation of UFOs (aka ANYs) was ready in 2014.
New implementation of status bars was ready in 2014.
Implementation of the touch input was ready in 2014 (using since C9)
New schema of statements’ work (used in C11) was ready in 2014.
New implementation of base Unicode support in the RTL was ready in 2015.
New implementation of pictures was ready in 2015.
New CLW compiler was generally ready in 2016.
Switching to usage of Unicode for strings in the RTL was done in 2017.
New implementation of WINDOWs and new controls’ hierarchy of classes was done in 2018.

Not-completed areas before switching to work on the support of AnyScreen in 2020: reports, menus.
Areas the work was not started on before 2020: new type descriptors, support of Unicode in the AppGen.

As follows from RZ’s information on DevCons, plans were changed sufficiently in 2022.

2 Likes

Thank you for the information. It’s much appreciated…