Jump to content

Recommended Posts

Posted

I am using the UniProgressbarWidget component and wanted to adjust its maximum value based on a value in my dbgrid line, how can I do this?

If in the dbgrid line the field has a total of 10 the maximum value of my UniProgressbarWidget would be 10

Sem título.png

Posted
1 hour ago, eduardosuruagy said:

If in the dbgrid line the field has a total of 10 the maximum value of my UniProgressbarWidget would be 10

Could you please clarify your question and attach a normal screenshot?

Posted
44 minutes ago, Sherzod said:

Você poderia esclarecer sua pergunta e anexar uma captura de tela normal?

The example I used is on the way: C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\Grid - WidgetColumn2

Looking at the image you can see that the column "Length (cm)" has random values and the component "UniProgressbarWidget1" that is connected to the column has a maximum value of 200.
See that in the arrow that I put there is a record that has a value of 400, how can I take the value that is in that line and put it in "UniProgressbarWidget1"

Sem título.png

Posted
18 hours ago, eduardosuruagy said:

See that in the arrow that I put there is a record that has a value of 400, how can I take the value that is in that line and put it in "UniProgressbarWidget1"

Hello,

Do you want the value was the maximum in the field on the store?

Posted
On 11/20/2020 at 9:24 AM, Sherzod said:

Hello,

Do you want the value was the maximum in the field on the store?

In each row the maximum value of the UniProgressbarWidget is equal to that of the "Length (cm)" column

Posted
On 11/23/2020 at 3:54 PM, eduardosuruagy said:

In each row the maximum value of the UniProgressbarWidget is equal to that of the "Length (cm)" column

Hello,

Sorry for the late reply.

Please give some examples, otherwise it's not very clear to me.

Posted
On 30/11/2020 at 09:40, Sherzod said:

Olá,

Desculpe pelo atraso na resposta.

Por favor, dê alguns exemplos, caso contrário, não fica muito claro para mim.

Boa tarde, consegue ver alguma coisa sobre isso?

  • 3 years later...
  • 8 months later...
Posted
On 11/30/2020 at 4:56 PM, eduardosuruagy said:

Follow the example

 

Hello.
I made some changes in this sample to change the maximum value at runtime
In the onclick of  ClientEvents.ExtEvents

function click(sender, eOpts)
{
    ajaxRequest(sender, 'select',
               {
                  name: sender.text,
                  width: sender.getWidth()
               }
             );
}

and then in AjaxEvent of UniDBGrid

procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if SameText(EventName,'select') then
  begin
    //ShowMessage(Params['name'].AsString + '  ' + Params['width'].AsString);
     UniProgressbarWidget1.Max := StrToInt(UniEdit1.Text);
  end;
end;

 

The above code is executed on the sixth event, but I don't see any change at runtime.

 

Regards.

 

Posted

Hello,

Your case is not very clear to me. Could you please clarify it?
Also, in any case, I recommend not using "standard" event names like "select" for ajaxRequest, because it may conflict with built-in events and cause unexpected behavior.

Posted
5 minutes ago, Sherzod said:

Your case is not very clear to me

I want to change the maximum value at runtime for UniProgressbarWidget1

UniProgressbarWidget1.Max :=1000

 

Regards.

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...