If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > control form properties from methods within form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-03-04, 15:07
cmose cmose is offline
Registered User
 
Join Date: Apr 2004
Posts: 16
control form properties from methods within form

hola all,
I'm rather unfamiliar with Paradox/objectpal and have a question: I'd like to control the visual properties of a form from a method within said form, specifically I'd like to change the color of the form based on the operating system. I've found what I need to check the os but I'm not sure how to alter the appearance of the form from within a method in the form (also would like to know how to assign an rgb color to the form).

many thanks!
Reply With Quote
  #2 (permalink)  
Old 05-11-04, 09:05
cmose cmose is offline
Registered User
 
Join Date: Apr 2004
Posts: 16
ok, figured it out. I forget the exact code but involved reading form properties into an array and then setting the new values in the array and iterating through the array to set all changed values in the form.
Reply With Quote
  #3 (permalink)  
Old 05-20-04, 03:54
Shores Shores is offline
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
I don't think you need any array.

You can simply change the color of the form by using the color property of the form object; in a method on the form:

self.color=blue

and that's all.

Remember that colors are, as always in windows, longints, and that you can use the predefined constants:

Black, Blue, Brown, DarkBlue, DarkCyan, DarkGray, DarkGreen, DarkMagenta, DarkRed, Gray, Green, LightBlue, Magenta, Red, White, Yellow, Transparent

and also clBtnFace and similar constants to read system configured colors (those the user set in the screen control panel).

Remember also that you may need to change the PAGE color, if it's not transparent.

Bye!
__________________
The only failure is not trying to do it.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On