Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple designer - how to ?

Status
Not open for further replies.

bitmapbrother

Programmer
Apr 21, 2005
12
CZ
Hi, I need to create simple designer so user can add controls to form and them move them, change size etc. My problem is that not all controls have Canvas so I cant draw "marks" for resizing. Next problem is that I need to select control by mouse click but not all controls have OnClick() event. I thought about PaintTo() method and my own mouse handling but PaintTo() doesnt work correctly with all controls. Any ideas? Thx.
 
There is an excellent article in this month's C++ Builder Developer's Journal on how to do that. Unfortunately, you have to be a subscriber to read it (IMHO, worth the price, though). There are some older articles that are in the public domain that may also address the problem, too.

James P. Cottingham
-----------------------------------------
[sup]To determine how long it will take to write and debug a program, take your best estimate, multiply that by two, add one, and convert to the next higher units.[/sup]
 
I am creating runtime designer which will be used by enduser - he creates forms with controls and finally save this as a project in custom format. So I need to show controls on the form and enable him to move and resize them. And here I have problem ... dont know how to draw to all controls and how to get onclick event from all controls ... I discovered that PaintTo() method works correctly only when control is already displayed ... thx.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top