Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-2908

ZK8 hflex/vflex not working in Captcha

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.0.1
    • 8.0.0
    • Components
    • Security Level: Jimmy
    • None
    • ZK 8.0.1

      hflex + width is no longer supported in ZK 8:

      Since the captcha component has a default size of 200px * 50px, which is used for both internal image generation and rendering it is currently impossible to stretch the captcha element using hflex/vflex.

      If the component width/height were decoupled from the rendering width/height it would be possible to define the internal image dimensions, separate from the rendering width, height.

      -------------------

      A possible workaround is to clear the width/height at the client side and apply the hflex instead then the widget will resize automatically:

      <zk xmlns:w="client">
      	<window border="normal" width="500px" sizable="true" height="70px">
      		<captcha id="cap" 
      			w:onBind="this.setWidth(null); this.setHflex(1); 
      					  this.setHeight(null); this.setVflex(1);"/>
      		<button label="redraw" onClick="cap.randomValue()"/>
      	</window>
      </zk>
      

            DevChu DevChu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h