Page 1 of 1

Custom Controls

Posted: Sat Sep 16, 2006 3:04 pm
by JBohanan
I wish to create a custom controls for a database browse/Lookup
and what I need to do is Display a Scroll bar on the left of the
control window. How do I display a scroll bar inside of the Control.

also need it a the bottom of the control sometimes.

in borland's workshop you used a WS_VSCROLL, and WS_HSCROLL.

Thank you for any Help
Jim

Posted: Sun Sep 17, 2006 4:37 am
by isiticov
Hello,

I think it is the same here. You just add WS_VSCROLL and WS_HSCROLL to WindowStyle and your control will include scrollbars.

Posted: Sun Sep 17, 2006 5:09 am
by JBohanan
Where do you add the WS_VSCROLL, and WS_HSCROLL to the
windowstyle at?

I don't see where you add it.

Posted: Sun Sep 17, 2006 5:24 am
by JBohanan
What I need is a Custom Control just like the Listbox, but with
the class name of TWBrowse, or TSBrowse.

I need all the same settings of the Listbox with only the
name of the control changed.


Thank you
jim

Posted: Sun Sep 17, 2006 6:12 am
by isiticov
You have 2 ways:
1. Use Custom Control- drop Custom Control from palette onto dialog. Switch to Edit as Text and add WS_HSCROLL and WS_VSCROLL in window styles (where WS_VISIBLE listed).
2. Use Listbox control- drop Listbox onto dialog; adjust all needed properties; switch to Edit as Text and change LISTBOX control type to your control name like TWBrowse. This will convert it to custom control storing all styles you defined for listbox.
Hope this helps.