U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » UppHub » MessageCtrl: A passive notifications ctrl and manager. (A a usefule CtrlLib add-on.)
Re: MessageCtrl: A passive notifications ctrl and manager. [message #49603 is a reply to message #49602] Sun, 11 March 2018 12:32 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1285
Registered: August 2007
Senior Contributor
Hello Luigi,

The thing is, MessageCtrl is simply a manager, there is no real reason to add it to a "layout".
IT is not a Ctrl derived class.
Messages will resize automatically depending on the size of it's parent.

You instantiate it in your, say, TopWindow, and then set a target (a Ctrl) for it to attach:


class MyWindow : public TopWindow {
 MessageCtrl messages;
 DocEdit     editor;
 RichEdit    richeditor; 

 void DisplayEditorErrorMessage() { 
      messages.Error(editor, "This is an error message.");
 }

 void DisplayRichEditorSuccessMessage() {
      messages.Success(richeditor, "This is a success message.");
 }

 // Other members, constructors, etc...
};




Think of it like a Prompt. You do not use them with layout. Nor MessageCtrl. (Of course you can also attach messages to layouted ctrls)

Example code provided with the MessageCtrl demonstrates that. (It adds top message boxes to the window itself, and the bottom meassage box to the editor widget.)

I've written a new example to clarify the behaviour. Please find the attached example. Smile
Best regards,
Oblivion



[Updated on: Sun, 11 March 2018 18:04]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Splash screen package
Next Topic: Sharing a few small packages
Goto Forum:
  


Current Time: Tue Oct 20 01:43:39 GMT+2 2026

Total time taken to generate the page: 0.00938 seconds