Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140227/62367758/attachment.html>
Mailing lists / lazarus / 2014-02
What GetChildParent does in designer and reader?
23 messages · 5 people · –
- FFabio Luis Girardi 12
- MMattias Gaertner 8
- AAntonio Fortuny 1
- HHans-Peter Diettrich 1
- Lluiz americo pereira camara 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
In designer: nothing.
In reader: it overrides the parent-child nesting of the stream. I don't know an example.
Mattias
So, to resolve some issues to make a "TDBCtrlGrid" for lazarus, designer should use this function to determine the real parent of a child control?
2014-02-27 7:59 GMT-03:00 Mattias Gaertner :
Show quoted text 13 lines
So, to resolve some issues to make a "TDBCtrlGrid" for lazarus, designer should use this function to determine the real parent of a child control?
Let me rephrase: No Lazarus component has ever used this function.
So far I understood that you wrote a custom control, but the designer does not allow to add child controls.
Is this correct?
Can you send some more code? Then maybe someone sees the problem.
Mattias
2014-02-27 9:24 GMT-03:00 Mattias Gaertner :
Show quoted text 8 lines
Right. I can't found a example of this function.
So far I understood that you wrote a custom control
Right too, I'm writing a TCustomControl descendant.
, but the designer does not allow to add child controls. Is this correct?
No. Lazarus allow me to add a child to my control, but I want redirect these childs to use a Panel inside of my TCustomControl as their parent.
Can you send some more code? Then maybe someone sees the problem.
Yes, I'll provide soon as possible.
Show quoted text 9 lines
[...] No. Lazarus allow me to add a child to my control, but I want redirect these childs to use a Panel inside of my TCustomControl as their parent.
I see. There is no function yet, to redirect designer drops. Components can only accept or refuse.
Maybe a method can be added to TWinControl:
function GetDesignerDropTarget(aControl: TControlClass): TWinControl;
virtual;Mattias
2014-02-27 10:07 GMT-03:00 Mattias Gaertner :
Show quoted text 15 lines
Yes, and by default it returns Self, and if it was override, this function returns the new parent of child controls? This is your idea?
Show quoted text 10 lines
Show quoted text 20 lines
Yes. You are reading my mind.
Mattias
2014-02-27 11:14 GMT-03:00 Mattias Gaertner :
Show quoted text 30 lines
control being inserted?
Show quoted text 10 lines
2014-02-27 10:07 GMT-03:00 Mattias Gaertner : Yes, and by default it returns Self, and if…
Voil?,
Tous les fichiers troisi?me g?n?ration sont en place selo les noms: pays_job.csv (2007 pour la France)
Les nombres de lignes par fichier correspond ? la seconde version J'ai sond? quelques fichiers: ils sont identiques entre versions 2 et 3. et sauf la Belgique job 2548 d?j? mis.
A. Fortuny
---
Ce courrier ?lectronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active. http://www.avast.com
On Thu, 27 Feb 2014 10:26:04 -0300 Yes. You are reading my mind. Mattias
Show quoted text 18 lines
Component Drag&Drop operations can be configured and controlled by the originator (here: Palette, Designer, Component...), which can e.g. provide a TDragObject governing the whole operation. In Lazarus these capabilites are restricted by the incompatible LCL DragManager, which does not use the methods of the TDragObjects declared in the VCL.
DoDi
[...] Component Drag&Drop operations
There is no drag when adding a component to a form.
Mattias
Hi Mattias!!
Revision 44299 is related with this?
The best regards
2014-02-28 7:56 GMT-03:00 Mattias Gaertner :
Show quoted text 17 lines
Hi!!
Attached the code of my prototype of TDBCtrlGrid. It works as expected on Delphi (except the function GetDesignerDropTarget that don't exists on Delphi TWinControl), but it don't works as expected on Lazarus.
2014-03-03 10:17 GMT-03:00 Fabio Luis Girardi :
Show quoted text 38 lines
Show quoted text 5 lines
On second thought the LCL method is not very flexible. I added a general designer event.
Please test.
Mattias
mytesthelper.pas(40,20) Error: identifier idents no member
"RemoveHandlerComponentAdded"Lazarus 1.3
2014-03-03 18:56 GMT-03:00 Mattias Gaertner :
Show quoted text 26 lines
Maybe RemoveHandlerAddClicked is a replacement?
2014-03-04 9:43 GMT-03:00 Fabio Luis Girardi :
Show quoted text 47 lines
Hi Mattias!!
This solution don't work too.
2014-03-04 9:46 GMT-03:00 Fabio Luis Girardi :
Show quoted text 63 lines
mytesthelper.pas(40,20) Error: identifier idents no member "RemoveHandlerComponentAdded"…
mytesthelper.pas(40,20) Error: identifier idents no member "RemoveHandlerComponentAdded"
That was a typo. It should be RemoveHandlerAddClicked.
Mattias
Maybe RemoveHandlerAddClicked is a replacement? 2014-03-04 9:43 GMT-03:00 Fabio Luis…
Maybe RemoveHandlerAddClicked is a replacement?
Yes.
Mattias
Hi Mattias!! This solution don't work too. 2014-03-04 9:46 GMT-03:00 Fabio Luis Girardi :…
Hi Fabio,
I'd like to share how i implemented similar behavior of TDbCtrlGrid, so maybe you can be interested. If not just ignore.
First i create a TFrame in Lazarus put the controls that i need to be there.
In the control i want to display the instances of the frame i create at runtime according to a configuration
This way i have the easy of use of Lazarus designer with a lot of flexibility.
I created an control (
https://code.google.com/p/luipack/source/browse/trunk/luicontrols/jsonmediators.pas) that does the above. The frame class
(TJSONBooleanRadioButtonViewFrame)
is hardcoded but it can be decoupled by using an interface.
To implement TDbCtrlGrid like control with this approach seems easier then you are trying:
- Define an interface with what you need to configure the DbCtrls like IDbCtrlItem = interface
SetDatasource(Datasource: TDataSource);
end;- Create a control that has a TFrameClass property
- When the TFrameClass is set, check if implements IDbCtrlItem
- At runtime create as many TFrameClass instances as needed configuring them at initialization through the IDbCtrlItem interface
- Bind to dataset events and update the controls accordingly
Luiz
2014-03-04 10:41 GMT-03:00 Fabio Luis Girardi :
Show quoted text 88 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140304/d996bc97/attachment.html>
I'll try this approach. At the moment this is a good workaround... :)
"luiz americo pereira camara" wrote 134 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140304/8ac6c7e6/attachment-0001.html>
But I'll keep trying to implement this.
"Fabio Luis Girardi" wrote 138 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140305/1c363324/attachment-0001.html>
