I'm going to use the message window actively in an app, so I don't want the user to close it.
Looking in the code (and inherited code, and other in herited code...) I see many references to frame decorations, but the question is: is there ONE place to skip the close-box of the message window without interfering with other windows?
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01
no closing of message window
Regards,
Audun.
Audun.
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
You can change the decoration in the taskWindow, before you show the form:
Code: Select all
predicates
onShow : window::showListener.
clauses
onShow(_, _CreationData) :-
MessageForm = messageForm::new(This),
MessageForm:setDecoration(titlebar([])),
MessageForm:show().
Regards Thomas Linder Puls
PDC
PDC
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01
Something funny here....
I wanted no closebutton, but still keep minimizebutton and maximizebutton. However, it seems this predicate is a "all or none." If I try this, there's no buttons at all:
onShow(_, _CreationData) :-
MessageForm = messageForm::new(This),
MessageForm:setDecoration(titlebar([minimizebutton(), maximizebutton()])), %Only two buttons, but they don't show
MessageForm:show().
I've tested the same thing with the task-window: same result: deleting the closebutton() from the decoration-list renders a taskwindow titlebar without buttons at all.
I wanted no closebutton, but still keep minimizebutton and maximizebutton. However, it seems this predicate is a "all or none." If I try this, there's no buttons at all:
onShow(_, _CreationData) :-
MessageForm = messageForm::new(This),
MessageForm:setDecoration(titlebar([minimizebutton(), maximizebutton()])), %Only two buttons, but they don't show
MessageForm:show().
I've tested the same thing with the task-window: same result: deleting the closebutton() from the decoration-list renders a taskwindow titlebar without buttons at all.
Regards,
Audun.
Audun.
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01
Crisis ! After I tinkered with the Taskwindow (automatic generated code), there's a fatal link error:
Type Description Filename f2505 Fatal error 2505: Cannot create file 'Exe\fallkon.exe', errno=13 fallkon.exe
I've deleted OBJ-directory, restarted system, Rebuilt All, but no use. And of course, I've mended the code (creation of task-window) by copying it in from one of the example-programs.
Type Description Filename f2505 Fatal error 2505: Cannot create file 'Exe\fallkon.exe', errno=13 fallkon.exe
I've deleted OBJ-directory, restarted system, Rebuilt All, but no use. And of course, I've mended the code (creation of task-window) by copying it in from one of the example-programs.
Regards,
Audun.
Audun.
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
A Microsoft Windows window cannot have minimize and maximize unless it have close.
The error:
Booting will of course help, but closing the program is sufficient.
The error:
comes when you then program (i.e. falkon.exe) is still running while you try to create a new one.Type Description Filename f2505 Fatal error 2505: Cannot create file 'Exe\fallkon.exe', errno=13 fallkon.exe
Booting will of course help, but closing the program is sufficient.
Regards Thomas Linder Puls
PDC
PDC
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Creation of message window with user defined buttons and redirection of standerd output
I have dealt with this problem in my contribution http://wiki.visual-prolog.com/index.php ... d:TestDraw.
I have omitted the handling of the relative distance of the frames of message window from the client rectangle of the task window from the code excerts below
I have omitted the handling of the relative distance of the frames of message window from the client rectangle of the task window from the code excerts below
Code: Select all
% Construction with given buttons in the titlebar and and close responder
constructors
% Construction with given buttons in the titlebar and and close responder
new:(window Parent,
frameDecoration::decoration Buttons, % Buttons on the titlebar.
frameDecoration::closeResponder CloseMode,
string Title, font, boolean RedirectStdio).
constants
% Display with changed titlebar and closing modes.
max_min_button:frameDecoration::decoration=frameDecoration::titlebar([frameDecoration::maximizebutton(),frameDecoration::minimizebutton()]).
max_min_close_button:frameDecoration::decoration=frameDecoration::titlebar([frameDecoration::maximizebutton(),frameDecoration::minimizebutton(),frameDecoration::closeButton()]).
predicates
denyCloseResponder(_)=denyClose().
acceptCloseResponder(_)=acceptClose().
clauses
new(Parent,Buttons,CloseResponder,Title, Font, RedirectStdio) :-
formWindow::new(Parent),
setText(Title),
formMessageControl := messageControl::new(This),
formMessageControl:setLines(MaxLines),
% The listeners react the change of the size of the parent window.
addSizeListener(resizeListener),
addGetFocusListener(focusListener),
addUserListener(
Parent:addSizeListener(onParentResize),
onParentResize(Parent),
% These are the settings of added properites
addDestroyListener(onDestroy),
setCloseResponder(CloseResponder),
setDecoration(Buttons),
if RedirectStdio=true then
stdio::setOutputStream(formMessageControl:getOutputStream())
end if.
predicates
onDestroy : destroyListener.
clauses
onDestroy(_) :-
if redirected_output=true then
stdio::setOutputStream(ini_out_stream)
end if,
Parent=getParent(),
Parent:removeSizeListener(onParentResize),
retractAll(instance(This)).
TIA, Regards,
Frank Nagy
Frank Nagy
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Is not the frame of Scilexer message window the same as the old fashioned one?
Audun,
If you inspect the code than you'll see that even if
formMessageControl : messageControl is replaced by a scilexer control within the message window,
but the modified handling of the window frame around it is still usable.
If you inspect the code than you'll see that even if
formMessageControl : messageControl is replaced by a scilexer control within the message window,
but the modified handling of the window frame around it is still usable.
TIA, Regards,
Frank Nagy
Frank Nagy
-
- Active Member
- Posts: 36
- Joined: 27 Apr 2000 23:01