Jump to content

New Component


picyka

Recommended Posts

Good morning my friends, I would like to know, if it is possible to add a checkBox to a good one, so that I can access it through the main component example: if combo.CheckBox.Checkd then this in VCL would be very simple to do, in UNIGUI, any tips?

 

Capturar.PNG

Link to comment
Share on other sites

10 minutos atrás, Sherzod disse:

Oi

Desculpe, pode esclarecer sua pergunta mais uma vez?

Broker didn't help me, the idea would be to add a checkBox inside a TUniCheckComboBox the idea would be to use this component as filters in reports, this checkBox would be to indicate if he wants the result true or false

Link to comment
Share on other sites

7 hours ago, picyka said:

Did you create it via delphi, or did you use a JS code?

1. In DesignTime (or RunTime):

UniCheckComboBox, UniCheckBox1

2. Form -> OnReady event:

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  UniCheckBox1.JSInterface.JSCall('alignTo', [UniCheckComboBox1.JSControl, 'tr?', JSInterface.JSStatement('[-35, 0]')]);
end;

 

Link to comment
Share on other sites

Hello,

10 minutes ago, picyka said:

I managed to create it at runtime, the alignment using the OnReady event When I put it in my component, I don't know what method would be equivalent to OnReady I will attach a small sample

Try:

...
protected
  { Protected declarations }
  ...
  procedure LoadCompleted; override;
...

procedure TUniCheckComboBoxTest.LoadCompleted;
begin
  inherited;

  Self.FCheckBox.JSInterface.JSCall('alignTo', [Self.JSControl, 'tr?', JSInterface.JSStatement('[-35, 0]')]);
end;

 

  • Like 1
Link to comment
Share on other sites

37 minutes ago, Sherzod said:

Hello,

Try:

...
protected
  { Protected declarations }
  ...
  procedure LoadCompleted; override;
...

procedure TUniCheckComboBoxTest.LoadCompleted;
begin
  inherited;

  Self.FCheckBox.JSInterface.JSCall('alignTo', [Self.JSControl, 'tr?', JSInterface.JSStatement('[-35, 0]')]);
end;

 

It worked, here's the source code, for the community.

uniCheckComboBoxTest.pas

  • Like 1
Link to comment
Share on other sites

On 6/11/2022 at 4:12 PM, Sherzod said:

I have installed your component. I will try to check. 

 

On 6/11/2022 at 4:14 PM, picyka said:

Thanks for the help.

Hello,

Sorry. I have tested, need to think about another solution.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Sherzod said:

 

Hello,

Sorry. I have tested, need to think about another solution.

Can you tell me why in a FORM it works and in a FRAME it doesn't?

Could it be an internal error?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...