Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 09 FEB 1999 04:01:04AM Glen Hawken wrote:

I am having trouble getting following code to work from the other month for altering a control to read-only.

The code is in a subroutine as below. I pass the Ctrlentid. I checked the STYLE property before and after the send_message, but it doesn' t change.

What am I doing wrong?

TIA

Glen.

Previous Code:

$INSERT LOGICAL

Equ WM_USER$ To 1024

Equ WM_SETREADONLY$ To WM_USER$ + 31

hwndEdit=Get_Property( CtrlEntID, "HANDLE" )

Call SendMessage( hwndEdit, WM_SETREADONLY$, TRUE$, 0 )


At 09 FEB 1999 04:30AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Ltd[/url] wrote:

Hi Glen,

This message only applies to EDIT class controls ( Edit Lines and Edit Boxes in OI-speak ), so is this what you are trying to use this on?

Can't say as I've ever had any problems with this before…

cpates@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 09 FEB 1999 06:56PM Glen wrote:

Thanks Carl,

The controls I'm trying to make read-only are EDITLINE/EDITBOX type controls! The style before and after for EDITLINE is 0x50000080 running previous code.

Do I need to change the STYLE manually?

Regards,

Glen.


At 10 FEB 1999 07:22AM Oystein Reigem wrote:

Glen,

The code is 100% correct. It works all the time for me.

(Or 99% correct, because (according to Carl) WM_SETREADONLY$ should be EM_SETREADONLY$, but what's in a name?)

The only possible error I can think of is that your CtrlEntId is wrong.

(Or there was one other thing I had a problem with once. Is your edit box bound to a symbolic field? Then the form compilation logic automatically makes it disabled. So you might have to call set_property(…, 'ENABLED', TRUE$) right before you make the edit box read-only (quoting Gene). But I don't know if this really affects the STYLE property.)

- Oystein -


At 10 FEB 1999 06:20PM Carl Pates (Sprezzatura Ltd) wrote:

Hi Glen,

You shouldn't need to change the STYLE at all…check Oystein's response, is it a symbolic?

Regards

Carl


At 11 FEB 1999 02:07AM Glen wrote:

Thanks Carl and Oystein.

When is a SendMessage not a SendMessage? When its a Send_Message! Sometimes I amaze myself.

Apols,

Glen.


At 11 FEB 1999 04:00AM Oystein Reigem wrote:

Glen,

I at least don't need any apologies. I'll fight for the right to make blunders in public. I don't know about Carl, though. :-)

- Oystein -

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/34d7bf2715f87d1a8525671300318979.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1