Jump to content

Recommended Posts

Posted

Hello, using UniGUI 1.95.0.1592 here.

I have a form with a TUniEdit and would like to set the Step property of it, in order to make the increment step 0.5.

image.png.10cd52b1c642a2599c8bb703e1fbdf0e.png

 

2 main keypoints:

  1. property TUniEdit.Step is protected, and changing that property by subclassing it, does not work.

  2. setting the "step" html attribute on the "input" element from the browser does the job, but I have trouble in finding how to set that html attribute from Delphi code.

image.png.0afbee6e849d7676bfe010c123a2792e.png

 

Thanks for your time.

 

 

Posted
13 hours ago, Luca Cenci said:

I have a form with a TUniEdit and would like to set the Step property of it

Hello,

Why don't you use UniSpinEdit, or is using UniEdit important for you?

Posted

I'm trying to use TUniSpinEdit as you suggested, but I cannot find a Step property on it.

Moreover, seems that its inner FValue is just an integer:

image.png.f32a7b800bc6d476fd08ca868ef8be58.png

 

Am I missing something?

... well, actually, I need to use a TUnimEdit because it's a mobile project, and there is no TUnimSpinEdit

  • 2 weeks later...
Posted

Thanks @Sherzod, I solved adding this function to ClientEvents.ExtEvents.painted event, from the post you mentioned.

function painted(sender, eOpts)
{
    var me=sender.inputElement;
    if (me) {
        me.dom.setAttribute('step', '0.5');
    }
}

 

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...