Recent

Author Topic: DropDown Panel?? Custom Control  (Read 14612 times)

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
DropDown Panel?? Custom Control
« on: May 02, 2015, 10:53:18 pm »
hi
is there any custom control wich is able to act as a drop down control/s container  while keepping the current form active (ex: do not gray the caption and let the programmer to handle key strokes etc)

Started implementing my version of such a control container but
before i move forward i would like to ask if there is already an implementation like this and i'm not aware of it in order to not reenvent the wheel

thank you very much
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: DropDown Panel?? Custom Control
« Reply #1 on: May 02, 2015, 10:59:17 pm »
No there is nothing out there and I'm also interested in one if you are willing to share.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Josh

  • Hero Member
  • *****
  • Posts: 1454
Re: DropDown Panel?? Custom Control
« Reply #2 on: May 02, 2015, 11:04:39 pm »
Hi
There was an expandpanel component, not sure how current or X platform it is, or if it will do what you require.

http://wiki.lazarus.freepascal.org/TMyRollOut_and_ExpandPanel
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #3 on: May 02, 2015, 11:10:05 pm »
Thank you taazz for your answer
i will share
if you don't mind i would like to wait for other people to confirm your answer as well before i proceed
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #4 on: May 02, 2015, 11:20:39 pm »
thank @josh
unless i'm missing something
AFAIK these panels are tight to the owner form and can not be expanted/resized out of the form if required
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: DropDown Panel?? Custom Control
« Reply #5 on: May 02, 2015, 11:44:57 pm »
thank @josh
unless i'm missing something
AFAIK these panels are tight to the owner form and can not be expanted/resized out of the form if required
There is a simple solution that can be implemented today even cross platform but it requires the Tform class be changed to auto forward any key and mouse events to the active pop up form and of course care must be taken to allow for pop up from inside a pop up window as well. So overall it has a difficulty level of 6~7 (with a max of 10), If you search this forums I have posted a windows only solution from mustang peak that if I remember correctly was working as is in lazarus as well.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #6 on: May 03, 2015, 12:05:31 am »
@taazz
Quote
but it requires the Tform class be changed to auto forward any key and mouse events to the active pop up form
since the container could contain many other controls/frames or even forms i think this it should be left to the programmer
Quote
care must be taken to allow for pop up from inside a pop up window as well
agreed it should be acting as normal as possible
Quote
If you search this forums I have posted a windows only solution from mustang peak that if I remember correctly was working as is in lazarus as well.
searched the forums but i was n't able to find a solution to be able
to
- holding the caption active
- add as many controls as i want
- add any type of control or frame or even forms if possible
- resize up down left right with code or let the end user do it
- have a pivot point around another control ex: Tbutton,TEdit ech or a point on the screen so can show as a result of a menu item action
- open / drop up or down acording to the possition on the screen
- do not use timers
- do not use and mess around with setfocus
and some other requirements as well there is no point to mention all of them

 the way i will go is THintwindow i had the best results so far with my tests
 do you had any experience with it for this subject?
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: DropDown Panel?? Custom Control
« Reply #7 on: May 03, 2015, 12:20:47 am »
@taazz
Quote
but it requires the Tform class be changed to auto forward any key and mouse events to the active pop up form
since the container could contain many other controls/frames or even forms i think this it should be left to the programmer

Can't be done no. The problem arises form the fact that a control can not receive focus or keyboard events or mouse events. If you leave that to the programmer then you leave everything to him.


Quote
care must be taken to allow for pop up from inside a pop up window as well
agreed it should be acting as normal as possible
Quote
If you search this forums I have posted a windows only solution from mustang peak that if I remember correctly was working as is in lazarus as well.
searched the forums but i was n't able to find a solution to be able
to
- holding the caption active
- add as many controls as i want
- add any type of control or frame or even forms if possible
- resize up down left right with code or let the end user do it
- have a pivot point around another control ex: Tbutton,TEdit ech or a point on the screen so can show as a result of a menu item action
- open / drop up or down acording to the possition on the screen
- do not use timers
- do not use and mess around with setfocus
and some other requirements as well there is no point to mention all of them

 the way i will go is THintwindow i had the best results so far with my tests
 do you had any experience with it for this subject?
there is some effort on the forums based on hint window as well. But hitn windows can not receive keyboard messages as far as I know and they can not handle combo boxes at all if I remember correctly. I'm not ignoring the feature list you posted but I'm not going to comment on it either for now.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #8 on: May 03, 2015, 01:06:02 am »
Thank you very much @taazz
so lets wait for a while to ensure there is not already a solution for this problem
if not i will proceed with my tests and i'll put together what excactly i have in mind
i'll share it and then we can talk with something in our hands
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: DropDown Panel?? Custom Control
« Reply #9 on: May 03, 2015, 02:16:38 am »
See dropdownmanager in LuiControls:

https://code.google.com/p/luipack/source/browse/trunk/luicontrols/

Warning: interface may change in future

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #10 on: May 03, 2015, 11:04:56 am »
@LuizAmérico
already test LuiControls inside CT
when ddousepopupform is false everything is inside the form and all is working as excpected
when ddousepopupform is true a sigsev error occurs at dropdown manager a line 169
added a line to create the popup form and worked but the caption of the main form is disabled when the new popup form open
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

LuizAmérico

  • Sr. Member
  • ****
  • Posts: 457
Re: DropDown Panel?? Custom Control
« Reply #11 on: May 03, 2015, 12:35:46 pm »
CodeTyphon is not supported by me, use it at your own risk.

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #12 on: May 03, 2015, 12:50:27 pm »
@LuizAmérico
also test it with new lazarus 1.4
had the same results
Edit **: the issue with the sig sev is not there i'm refering to the caption of the main form
Edit2 ***: just to inform i'm not able to checkout from the above link [ http://luipack.googlecode.com/svn/trunk/ luipack-read-only ] using tortoise svn
« Last Edit: May 03, 2015, 01:11:05 pm by Never »
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: DropDown Panel?? Custom Control
« Reply #13 on: May 03, 2015, 01:37:39 pm »
Edit2 ***: just to inform i'm not able to checkout from the above link [ http://luipack.googlecode.com/svn/trunk/ luipack-read-only ] using tortoise svn
It works if you use http://luipack.googlecode.com/svn/trunk/ at least it works for me that is.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Never

  • Sr. Member
  • ****
  • Posts: 409
  • OS:Win7 64bit / Lazarus 1.4
Re: DropDown Panel?? Custom Control
« Reply #14 on: May 03, 2015, 01:52:07 pm »
@taazz
Quote
It works if you use http://luipack.googlecode.com/svn/trunk/ at least it works for me that is.
thank you worked

re tested the trunk also with the provided demo
the results are the same when ddousepopupform is true
a form with out borders is openning the caption of the main form looks inactive also other issues not to mention
so the survey is active
Νέπε Λάζαρε λάγγεψων οξωκά ο φίλοσ'ς αραεύσε

 

TinyPortal © 2005-2018