Page 1 of 1

Ctrl+B doesn't work in standalone

Posted: Thu Jun 15, 2017 8:01 pm
by Cool Dave
Hi everyone,

I am working on a Windows application that uses htmltext for a lot of things.
Typing Ctrl+B (Bold), as well as italics and underline, works perfectly in livecode without getting into the htmltext, but in a standalone the keyboard shortcuts do nothing at all.
Is there something I can do to fix this rather than manually modifying the htmltext? Is this a bug that should be reported?

Thanks for any help!

Re: Ctrl+B doesn't work in standalone

Posted: Thu Jun 15, 2017 8:21 pm
by Klaus
Hi Dave,

IDE <> standalone!

Means if you did not create and script a "Text" menu in your app with its appropriate keyboard shortcuts just like the IDE, then this cannot work. 8)


Best

Klaus

Re: Ctrl+B doesn't work in standalone

Posted: Thu Jun 15, 2017 8:40 pm
by Cool Dave
Thanks Klaus,

So you are saying I have to manually code my own means of creating and destroying <b> tags, etc, in the htmltext?
That really sounds like something that should be included in the default field. After all, the folks who made livecode clearly already have the code.
if you did not create and script a "Text" menu
Do you mean a nice little row of buttons like the one in property inspector's "Text" tab?

Re: Ctrl+B doesn't work in standalone

Posted: Thu Jun 15, 2017 10:28 pm
by Klaus
Hi Dave,
Cool Dave wrote:So you are saying I have to manually code my own means of creating and destroying <b> tags, etc, in the htmltext?
Yes.
Cool Dave wrote:...
if you did not create and script a "Text" menu
Do you mean a nice little row of buttons like the one in property inspector's "Text" tab?
Yes, or the menu "Text" in the menubar, or create some buttons that will do the job.


Best

Klaus

P.S.
Thank you for not shooting the messenger! :D

Re: Ctrl+B doesn't work in standalone

Posted: Fri Jun 16, 2017 5:40 pm
by jacque
If you don't want to add a menubar to the stack you can use a commandKeyDown handler to catch cmd-b and set the textstyle of the selectedChunk to bold. There's usually no need to mess with the htmltext.