Non-breaking space

This forum is for eXpress++ general support.
Post Reply
Message
Author
Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Non-breaking space

#1 Post by Koverhage »

Hello Roger,

is there a way to insert a non-breaking-space with the dcget or dcmultiline command ?
I know the way with alt+255, but for the normal user is this intricate.

See
http://en.wikipedia.org/wiki/Non-breaking_space
Keyboard entry methods
Klaus

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Non-breaking space

#2 Post by rdonnay »

How are you wanting to do this? With the SPACE bar?
The eXpress train is coming - and it has more cars.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Non-breaking space

#3 Post by Koverhage »

with
Ctrl+Shift+Space
as Microsoft Word, Open Office
Klaus

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Non-breaking space

#4 Post by rdonnay »

Try this:

Code: Select all

#INCLUDE "dcdialog.CH"
#INCLUDE "appevent.CH"

#define xbeK_SH_CTRL_SPACE  720928

FUNCTION Main

LOCAL GetList[0], GetOptions, cMemo := '', oMemo

@ 0,0 DCMULTILINE cMemo SIZE 40,10 NOHSCROLL FONT '10.Lucida Console' OBJECT oMemo ;
      RESIZE DCGUI_RESIZE_RESIZEONLY

DCHOTKEY xbeK_SH_CTRL_SPACE ACTION {||PostAppEvent(xbeP_Keyboard,Asc(Chr(255)),,oMemo)}

DCGETOPTIONS RESIZE

DCREAD GUI FIT ADDBUTTONS TITLE 'Testing Chr(255)' OPTIONS GetOptions

WTF Chr(255) $ cMemo PAUSE

RETURN nil

PROC appsys ; RETURN
The eXpress train is coming - and it has more cars.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Non-breaking space

#5 Post by Koverhage »

Roger,

this work, thank you. Now i must find a way to make this global for all memo und character fields.
Klaus

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Non-breaking space

#6 Post by rdonnay »

Code: Select all

// Install global handler.  Put this in main program.
DC_ReadGuiHandler({|a,b,c,d,e,f|MyGlobalHandler(a,b,c,d,e,f)})



FUNCTION MyGlobalHandler( nEvent, mp1, mp2, oXbp, oDlg, Getlist )

IF nEvent == xbeP_Keyboard .AND. mp1 == xbeK_SH_CTRL_SPACE
  PostAppEvent( xbeP_Keyboard, Asc(Chr(255)),, oXbp )
ENDIF

RETURN DCGUI_NONE
The eXpress train is coming - and it has more cars.

Koverhage
Posts: 151
Joined: Mon Feb 01, 2010 8:45 am

Re: Non-breaking space

#7 Post by Koverhage »

Roger,

thank you again.
Klaus

Post Reply