|
FORUMS PROFESSIONNELS WINDEV, WEBDEV et WINDEV Mobile |
| | | | | |
Reach server code from Control template |
Débuté par Rubin, 06 sep. 2017 14:42 - 3 réponses |
| |
| | | |
|
| |
Posté le 06 septembre 2017 - 14:42 |
I was trying to customize a CheckBox-Control, but couldn't set an own background for the check only. So instead I've created an on control via "New Control Template". What I do now is, I have two Image controls layered onto each other. One is the background and one is just the check sign.
The check sign image is per default visible = false. In the onmousedown-event I have this code: IF IMG_Check..Visible = False THEN IMG_Check..Visible = True ELSE IF IMG_Check..Visible = True THEN IMG_Check..Visible = False END
same in the onmousedown-event from the background image.
Now my question is, how can I detect if the IMG_Check..Visible is false or true? All I receive is the default visibility value set in the IMG description. I suppose my code only changes the visibility in the browser which doesn't affect the actuall visibility property of the control. How is it done with the normal CheckBox-Control? there I can check its value in my server code.
Hopefully this was clear.
Thanks |
| |
| |
| | | |
|
| | |
| |
Posté le 06 septembre 2017 - 16:56 |
Hi Rubin,
On the browser side, you ALSO need to store the information in something that WILL be sent to the server, by example a hidden/invisible edit field. THen on the server, you just read that field content
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 9/6/2017 à 6:42 AM, Rubin a écrit :
I was trying to customize a CheckBox-Control, but couldn't set an own background for the check only. So instead I've created an on control via "New Control Template". What I do now is, I have two Image controls layered onto each other. One is the background and one is just the check sign.
The check sign image is per default visible = false. In the onmousedown-event I have this code: IF IMG_Check..Visible = False THEN IMG_Check..Visible = True ELSE IF IMG_Check..Visible = True THEN IMG_Check..Visible = False END
same in the onmousedown-event from the background image.
Now my question is, how can I detect if the IMG_Check..Visible is false or true? All I receive is the default visibility value set in the IMG description. I suppose my code only changes the visibility in the browser which doesn't affect the actuall visibility property of the control. How is it done with the normal CheckBox-Control? there I can check its value in my server code.
Hopefully this was clear.
Thanks |
| |
| |
| | | |
|
| | |
| |
Posté le 07 septembre 2017 - 08:53 |
That worked perfectly fine, thank you very much!
So now I have two IMG controls and one EDIT control on top of each other. I do have one more problem, though. When I use my custom control on a PAGE, it is at the furthest bottom of the page, not where I actually positioned it.
Could it be an anchoring problem of one of the controls? The control was placed on the page where the arrow is pointing at.
Thank you |
| |
| |
| | | |
|
| | |
| |
Posté le 07 septembre 2017 - 23:28 |
Hi Rubin,
are all control set to allow being on top of each other (second tab, top right option)?
Otherwise, put all your control in a cell, and set the cell where you want it (or create a supercontrol)
Best regards
-- Fabrice Harari International WinDev, WebDev and WinDev mobile Consulting
Ready for you: WXShowroom.com, WXReplication (open source) and now WXEDM (open source)
More information on http://www.fabriceharari.com
Le 9/7/2017 à 12:53 AM, Rubin a écrit :
That worked perfectly fine, thank you very much! So now I have two IMG controls and one EDIT control on top of each other. I do have one more problem, though. When I use my custom control on a PAGE, it is at the furthest bottom of the page, not where I actually positioned it.
Could it be an anchoring problem of one of the controls? The control was placed on the page where the arrow is pointing at. Thank you |
| |
| |
| | | |
|
| | | | |
| | |
| | |
| |
|
|
|