We capitalize our City field in an address database by setting Conversion to Uppercase. This is set in the resource, as follows:
CONTROL "City:", RELATIEVENSTER_MCITY, "Edit", ES_AUTOHSCROLL|ES_UPPERCASE|WS_TABSTOP|WS_CHILD|WS_BORDER, 150, 137, 156, 16, WS_EX_CLIENTEDGE
Now one client would like to be able to mix cases, so get rid of the upper case conversion. If it was a setting in the init (like oDCmCITY:Picture := "!!!!!!!!!!") I could override it using a setting in the Postinit.
Is it also possible to override "ES_UPPERCASE" resource?
I know I could set a picture instead depending on what the user has chosen but I was just wondering if there's another way, leaving the resource Conversion setting as it is.
Dick
Change SLE Resouce settings realtime
Change SLE Resouce settings realtime
Hi Dick,
Why don't you remove the ES_UPPERCASE from the resource (or, if the window is editor generated, set the "Conversion" property of the SLE in the WED to "No Conversion") and then set the picture as you said manually at runtime, so you have full control over this?
Why don't you remove the ES_UPPERCASE from the resource (or, if the window is editor generated, set the "Conversion" property of the SLE in the WED to "No Conversion") and then set the picture as you said manually at runtime, so you have full control over this?
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Change SLE Resouce settings realtime
Hi Dick,Is it also possible to override "ES_UPPERCASE" resource?
yes, the style ES_UPPERCASE can be added or removed at runtime.
Code: Select all
<oSle>:SetStyle ( ES_UPPERCASE , <lSet> )
Karl-Heinz
Change SLE Resouce settings realtime
Oh, nice! I was certain that this actually doesn't work at runtime, but tested it and it indeed does!Karl-Heinz wrote:Hi Dick,Is it also possible to override "ES_UPPERCASE" resource?
yes, the style ES_UPPERCASE can be added or removed at runtime.
RegardsCode: Select all
<oSle>:SetStyle ( ES_UPPERCASE , <lSet> )
Karl-Heinz
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Change SLE Resouce settings realtime
Hello Karl-Heinz,
Thank you!
if (lUserWantsCityNotCapitalized)
SELF:oDCmCITY:SetStyle(ES_UPPERCASE,FALSE)
endif
works as I want it.
And besides, you have even taught the Master himself something new
Dick
Thank you!
if (lUserWantsCityNotCapitalized)
SELF:oDCmCITY:SetStyle(ES_UPPERCASE,FALSE)
endif
works as I want it.
And besides, you have even taught the Master himself something new
Dick
Change SLE Resouce settings realtime
Hehe, ok but seriously if there's one master at least in this area, it's Karl-Heinz. I remember some 20 years ago when I was mostly lurking in the clcvo newsgroup and he was replying to EVERY single question regarding the Win32 API and always in a correct way of course and I was wondering how on earth he knew ALL that stuff!
That's when I decided to do A LOT of reading and try to reach a similar level myself, thinking that it would be helpful in the future. Well, it worked, I learned a lot and it did end up being very helpful , but of course he will always be one step ahead!
That's when I decided to do A LOT of reading and try to reach a similar level myself, thinking that it would be helpful in the future. Well, it worked, I learned a lot and it did end up being very helpful , but of course he will always be one step ahead!
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Change SLE Resouce settings realtime
Part of the work is to find - and remembering of course - the places where help is provided.
e.g. https://docs.microsoft.com/en-us/window ... rol-styles
And come on Chris. What you and the Dev Team are doing day by day is incredible and incomparable. In Arnie´s words: You are the true action heroes, the true commandos and predators
regards
Karl-Heinz
e.g. https://docs.microsoft.com/en-us/window ... rol-styles
And come on Chris. What you and the Dev Team are doing day by day is incredible and incomparable. In Arnie´s words: You are the true action heroes, the true commandos and predators
regards
Karl-Heinz
Change SLE Resouce settings realtime
Indeed! And thanks for posting this, reading it I now understand why I had trouble in the past with the ES_READONLY property, could not change it at runtime and assumed the same would be true for ES_UPPERCASE and other as well.Karl-Heinz wrote:Part of the work is to find - and remembering of course - the places where help is provided.
e.g. https://docs.microsoft.com/en-us/window ... rol-styles
But the topic above points out that in order to change it, you need to use the EM_SETREADONLY message, instead of changing ES_READONLY directly... Oh well, very glad that in Windows Forms those aspects are being handled much better and in a universal way!
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Change SLE Resouce settings realtime
I could not agree more:
@Chris @Fabrice @Nikos @Robert
What you and the Dev Team are doing day by day is incredible and incomparable.
Wolfgang
(the names are alfabetical order).
@Chris @Fabrice @Nikos @Robert
What you and the Dev Team are doing day by day is incredible and incomparable.
Wolfgang
(the names are alfabetical order).
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Change SLE Resouce settings realtime
Hello to all,
my Intention is, changing controls to readonly (and also to readwrite) at runtime, but keeps the value in black color (NOT changing to lightgrey).
Need help: Can anybody teach my the correct syntax in X#:
SendMessage(self:oDCmLASTNAME:handle(), EM_SETREADONLY, ??????)
Regards
Alf
my Intention is, changing controls to readonly (and also to readwrite) at runtime, but keeps the value in black color (NOT changing to lightgrey).
Need help: Can anybody teach my the correct syntax in X#:
SendMessage(self:oDCmLASTNAME:handle(), EM_SETREADONLY, ??????)
Regards
Alf