|
Reach server code from Control template |
Started by Rubin, Sep., 06 2017 2:42 PM - 3 replies |
| |
| | | |
|
| |
Posted on September, 06 2017 - 2:42 PM |
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 |
| |
| |
| | | |
|
| | |
| |
Posted on September, 06 2017 - 4:56 PM |
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 |
| |
| |
| | | |
|
| | |
| |
Posted on September, 07 2017 - 8:53 AM |
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 |
| |
| |
| | | |
|
| | |
| |
Posted on September, 07 2017 - 11:28 PM |
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 |
| |
| |
| | | |
|
| | | | |
| | |
|