When you create a new ABL MDI Form you get a form where the area for the MDI children has a dark gray background.
How can you changes this color? Setting the Form BackColor does not work.
Using a BackgroundImage *does* work, but what I would like to do is set a background color in addition to a centered image for the company logo.
I cannot find anything on the internet or in the documentation about this. What am I missing?
The MDI Parent has a MDIClient control that displays the gray background. You can loop through the MDI Parent's control collection and check if the control type is MDIClient then assign it a new background color.
Hi Peter,
I hope i may ask a question about your thread 'how to set the background color of an MDI Form'.
I also would like to accomplish this, and the reply you've got was 'loop through the MDI Parent's control collection'. However I'm trying to do this, but I didn't succeeded.
Were you able to accomplish this ? Are you willing to share an example piece of code ?
Kind regards
Bart
Here's code that we use to add a watersign image to the Mdi client area - changing the background color should be very similar. We run this code in the MDI container forms OnLoad method override - after the SUPER:OnLoad (e).
DO i = 0 TO THIS-OBJECT:Controls:Count - 1: IF TYPE-OF (THIS-OBJECT:Controls[i], System.Windows.Forms.MdiClient) THEN DO: CAST (THIS-OBJECT:Controls[i], System.Windows.Forms.MdiClient):BackgroundImage = System.Drawing.Bitmap:FromFile (cFileName) . LEAVE . END. END.
Hi Mike,
Thanks ! That did the trick !
Kind regards
Bart