In BlackBox I can create hyperlinks by writing
<InfoCmds.Start('http://community.blackboxframework.org/')>BlackBox Component Builder Forums<>
select the line and use the menus Tools -> Create Link.
It is shown as
BlackBox Component Builder Forums
When I point with the mouse on this hyperlink I would like to see its command in the status line:
InfoCmds.Start('http://community.blackboxframework.org/')
and the hyperlink itself should by underlined
BlackBox Component Builder Forums
How to implement this task.
Thank you very much for any help.
- Helmut
How to show the hyperlink command in the status line?
Re: How to show the hyperlink command in the status line?
I practised this change in module StdLinks:
It only shows the destination of the link in the status bar, but does not underline the text of the link.
Code: Select all
PROCEDURE (v: Link) HandleCtrlMsg* (f: Views.Frame; VAR msg: Controllers.Message; VAR focus: Views.View);
...
PROCEDURE ShowDest(); <------ new subprogram
VAR s: POINTER TO ARRAY OF CHAR; quot: CHAR;
len, k, j: INTEGER;
BEGIN
IF v.cmd = NIL THEN
Dialog.ShowStatus("")
ELSE
len := LEN(v.cmd);
k := 0; WHILE (k < len) & (v.cmd[k] # "(") DO INC(k) END;
IF k < len THEN
NEW(s, len - k);
INC(k); quot := v.cmd[k];
INC(k); j := 0;
WHILE (k < len) & (v.cmd[k] # quot) DO s[j] := v.cmd[k]; INC(k); INC(j) END;
s[j] := 0X;
Dialog.ShowStatus(s)
ELSE
Dialog.ShowStatus(v.cmd)
END
END;
END ShowDest;
BEGIN
WITH msg: Controllers.PollCursorMsg DO
msg.cursor := Ports.refCursor
| msg: TextControllers.FilterPollCursorMsg DO
ShowDest; <------
IF isHot(msg.controller, msg.x, msg.y, {}) THEN
msg.cursor := Ports.refCursor; msg.done := TRUE;
END
...
END HandleCtrlMsg;
Re: How to show the hyperlink command in the status line?
Manuel, thank you very much.
It works perfectly.
Personally I prefer to see the complete command and changed ShowDest to
- Helmut
It works perfectly.
Personally I prefer to see the complete command and changed ShowDest to
Code: Select all
PROCEDURE ShowDest;
BEGIN
IF v.cmd = NIL THEN
Dialog.ShowStatus("")
ELSE
Dialog.ShowStatus(v.cmd)
END;
END ShowDest;