Recent

Author Topic: Changing showmessage popup properties  (Read 7802 times)

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Changing showmessage popup properties
« on: September 15, 2010, 02:48:46 pm »
Is there any way to change the properties, color, font, etc for a simple showmessage() popup??

I'm trying to duplicate an existing program where when you are in the screen the popups match the screen colors/fonts/background but the menu bar items match the system popups like what you get normally with showmessage();  At the minimum I'd like to just change the colors when popping up on the main form.  I guess if it isn't possible using showmessage or a similar routine I'll have to make a form and pop it up modally but I was trying to avoid that just to keep things simpler.

BlueIcaro

  • Hero Member
  • *****
  • Posts: 832
    • Blog personal
Re: Changing showmessage popup properties
« Reply #1 on: September 15, 2010, 03:15:57 pm »
Hello, try to create a form, with borde = dialog, put a button, remove it from automatic create list, from proyect properties.

Then create the form, by code, and before show it, change the properties as you wish.

/BlueIcaro

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Changing showmessage popup properties
« Reply #2 on: September 15, 2010, 03:24:28 pm »
I came to that conclusion also.  I also decided that I need to stop focusing on the minutia and actually get the bones of the program working first.  I tend to want perfection first time around so I get stalled with the simpler or really unneeded stuff  :-[

After I get the main stuff working I'll go back and add in custom error and message boxes.

I also wondered if I might not create the entire message box form in code so I wouldn't need to add yet another form to the IDE  :-\

BlueIcaro

  • Hero Member
  • *****
  • Posts: 832
    • Blog personal
Re: Changing showmessage popup properties
« Reply #3 on: September 15, 2010, 03:30:34 pm »


I also wondered if I might not create the entire message box form in code so I wouldn't need to add yet another form to the IDE  :-\

Well, I have some "special" forms that I reuse in my programs. I save my "special" form in a folder.
When I need it, I add it to my new proyect.

/BlueIcaro

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
Re: Changing showmessage popup properties
« Reply #4 on: September 15, 2010, 07:27:35 pm »
You can also use a MessageBox where you can use the standard icons like INFO, WARNING ERROR QUESTION :

Code: [Select]
      Application.MessageBox(
        'My message here.',
        'My Title', MB_ICONEXCLAMATION);
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: Changing showmessage popup properties
« Reply #5 on: September 15, 2010, 07:44:27 pm »
You can also use a MessageBox where you can use the standard icons like INFO, WARNING ERROR QUESTION :

Code: [Select]
      Application.MessageBox(
        'My message here.',
        'My Title', MB_ICONEXCLAMATION);

I saw that, thanks anyway, but what I was talking about was changing the actual display properties like background color and font color.  I only need the OK button but I was looking to make the popup look more like an old style text popup on a dumb terminal instead of looking like a windows popup.  Cosmetic only and something I'll work on AFTER I bring the thing to life.   :D

 

TinyPortal © 2005-2018