Welcome! Log In Create A New Profile

Advanced

WB22 - Check Box Control

WB22 - Check Box Control
September 06, 2018 10:49PM
Hi All

Next to a check box control I have the "caption" All Clients. At runtime I am wanting to change the caption based on the number of clients to All Clients (20) where 20 is the number of clients calculated when a server procedure is run. I have tried:

CBOX_AllClients..Caption = "All Clients (" + nClientCount + ")" but the control caption does not change.

..Caption is not available in browser code. How can I get the control refreshed?


Any ideas?


Cheers
André
Re: WB22 - Check Box Control
September 07, 2018 01:59PM
No one knows ow t change the caption at runtime? :-(
Re: WB22 - Check Box Control
September 07, 2018 02:02PM
Hi André,

Your control is probably set as automatic instead of dynamic. Try setting it as dynamic first...

Then if, that doesn't work, tell us everything we ask each time: where is the code, what type of code it is (ajax or not), what type of page/site....

Best regards

Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

Free Video Courses, free WXShowroom.com, open source WXReplication, open
source WXEDM.

More information on [www.fabriceharari.com]
Re: WB22 - Check Box Control
September 07, 2018 04:52PM
Hi André,

Modifying captions in browser code is a new feature in version 23.
So in version 22 you need to use server code (or AJAX in browsercode if you can't use servercode).
Just put the code in the serverprocedure where the number of clients is calculated.

Kind regards,
Piet
Re: WB22 - Check Box Control
September 08, 2018 08:24PM
Hi Fabrice

You wrote:

>>Your control is probably set as automatic instead of dynamic. Try setting it as dynamic first...

Makes no difference.

Server procedure that is called is AJAX and is called in browser code with update controls.

Tried everything - the caption does not change.

If anyone has example code where a caption can be changed at runtime I would be grateful.

Cheers
André
Re: WB22 - Check Box Control
September 09, 2018 02:49AM
Update - I gave up - need to also change the option caption.

Tool a different rout with static controls.
David Harms
Re: WB22 - Check Box Control
October 16, 2018 06:11AM
André Labuschagné Wrote:
-------------------------------------------------------
> Update - I gave up -

I find that's often the more productive solution with PCSoft products.
Re: WB22 - Check Box Control
October 16, 2018 05:13PM
Hehehehe... another dissatisfied Clarion user trying out a superior product. winking smiley
Re: WB22 - Check Box Control
October 17, 2018 12:14AM
Hi Guys,

There's always the workaround..
The "caption" next to the checkbox is not the caption, but the content and afaik it cannot be changed at runtime.
Instead, you can just remove the content of the checkbox and resize the checkbox to just the size of the checkmark.
Place a static or rta control next to it et voila you can change that at runtime easily.

Kind regards,
Piet
Re: WB22 - Check Box Control
October 19, 2018 12:14PM
Hi Dave

You wrote:

> I find that's often the more productive solution with PCSoft products.

smiling smiley

The problem I have had is that the answer is mostly somewhere to be found - so I only give up when I have confirmation from either a group such as this or directly from PCSoft. Generally speaking if you can think it you can do it. The Frenglish often gets in the way though.

Just completed a Web Dev app that is saving a client USD$10,000 per annum - took about six weeks - takes care of three mission critical functions superbly. The client was hooked into a cloud offering. We were able to virtually duplicate what they were used to but obviously improve it and add many things they had hoped to have in the rented cloud solution. Not a small task in the Web App space. WB was up to it.

So this little issue hardly registered on the scale of needs and there was a very easy workaround - kept the caption and just had a string placed next to it with the variable data that constantly changes.

And this little added value to the client is probably about 1% now of our enterprise offering. So we are and our client are happy campers. They have saved themselves lots of tom and we have added new features to our offering.

Found very little we cannot do with WX stuff.

Nice to see you lurking around hear Dave - it is awash with old Clarioneers as are the other WX forums. Many, as we, use both tools in addition to a few others such as Delphi and different variants of C++ and C# and so on. Need lots of tools in the shed these days to be effective in the hunt.

Just come back from a WX conference - quite amazing how many big corporates are now using it in house.

Cheers
André
David Harms
Re: WB22 - Check Box Control
October 20, 2018 03:00AM
Hi André,

There's also very little (nothing) one cannot do using C and the Win32 API either. It's just a matter of what is going to get the job done in the least amount of time. Horses for courses.

Dave

André Labuschagné Wrote:
-------------------------------------------------------

> Found very little we cannot do with WX stuff.
Re: WB22 - Check Box Control
October 20, 2018 04:44PM
Hi Dave

You wrote:

> the least amount of time.

Pretty much what it is all about.....

Cheers
André
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: