Custom Controls

This forum designated to discuss the Resource Builder
Post Reply
JBohanan
Posts: 3
Joined: Fri Sep 15, 2006 3:43 am

Custom Controls

Post 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

isiticov
Site Admin
Posts: 2204
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.

JBohanan
Posts: 3
Joined: Fri Sep 15, 2006 3:43 am

Post by JBohanan »

Where do you add the WS_VSCROLL, and WS_HSCROLL to the
windowstyle at?

I don't see where you add it.

JBohanan
Posts: 3
Joined: Fri Sep 15, 2006 3:43 am

Post 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

isiticov
Site Admin
Posts: 2204
Joined: Thu Nov 21, 2002 3:17 pm

Post 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.

Post Reply