picyka Posted June 8, 2022 Share Posted June 8, 2022 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? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 8, 2022 Share Posted June 8, 2022 Hi, Sorry, can you please clarify your question once again? Quote Link to comment Share on other sites More sharing options...
picyka Posted June 8, 2022 Author Share Posted June 8, 2022 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 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 8, 2022 Author Share Posted June 8, 2022 I have component similar to edit in VCL Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 8, 2022 Share Posted June 8, 2022 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 8, 2022 Author Share Posted June 8, 2022 1 hour ago, Sherzod said: Wow, what a beautiful thing. How do I know if it's checked or not? example: if fComboFiltro.Checked then Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 8, 2022 Share Posted June 8, 2022 It's a standard UniCheckBox. 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 8, 2022 Author Share Posted June 8, 2022 14 minutos atrás, Sherzod disse: É um UniCheckBox padrão. Did you create it via delphi, or did you use a JS code? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 9, 2022 Share Posted June 9, 2022 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; Quote Link to comment Share on other sites More sharing options...
picyka Posted June 9, 2022 Author Share Posted June 9, 2022 Good morning my friend, 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 uniCheckComboBoxTest.pas Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 9, 2022 Share Posted June 9, 2022 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; 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 9, 2022 Author Share Posted June 9, 2022 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 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 9, 2022 Author Share Posted June 9, 2022 When I tried to use frame, it gave an error, it was very easy lol Click in Button1 uniCheckComboBoxTest.pas TestCase.zip Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 9, 2022 Share Posted June 9, 2022 5 hours ago, picyka said: it gave an error Hello, What error are you getting? Quote Link to comment Share on other sites More sharing options...
picyka Posted June 9, 2022 Author Share Posted June 9, 2022 20 minutos atrás, Sherzod disse: Olá Que erro você está recebendo? Quote Link to comment Share on other sites More sharing options...
picyka Posted June 10, 2022 Author Share Posted June 10, 2022 Were you able to reproduce the error? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 11, 2022 Share Posted June 11, 2022 14 hours ago, picyka said: Were you able to reproduce the error? Sorry not yet... 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 11, 2022 Share Posted June 11, 2022 I have installed your component. I will try to check. 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 11, 2022 Author Share Posted June 11, 2022 Dois minutos atrás, Sherzod disse: Instalei seu componente. Vou tentar verificar. Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 14, 2022 Share Posted June 14, 2022 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. 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 14, 2022 Author Share Posted June 14, 2022 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? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 15, 2022 Share Posted June 15, 2022 10 hours ago, picyka said: Can you tell me why in a FORM it works and in a FRAME it doesn't? Could it be an internal error? Hello, It's not even about the frame, it's about the implementation. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 18, 2022 Share Posted June 18, 2022 Quote Link to comment Share on other sites More sharing options...
picyka Posted June 18, 2022 Author Share Posted June 18, 2022 17 minutos atrás, Sherzod disse: Did it work on Frame and Form? Hug my friend. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 18, 2022 Share Posted June 18, 2022 1 minute ago, picyka said: Did it work on Frame and Form? Yes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.