×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Change the size of Tree View elements in Visual FoxPro

Change the size of Tree View elements in Visual FoxPro

Change the size of Tree View elements in Visual FoxPro

(OP)
Hi, I'm new in FoxPro, I'm making a desktop application to automate ordering product in the shop.

I have different types of elements to choose from to complete the order form, at first I've tried to use checkboxes for selection, but users will be making the order using a touch-screen and I need to have bigger elements, so I ended up with labels (Webdings2) and changing their back color onClick. By clicking some elements I need to show their child elements (just like in the tree view). My issue is that I have several different forms to be completed and they are pretty the same, by the end of completion of the form I need to validate the application (if the user has marked every required field). I could hard-coded it, but later on, I might need to add a new form or someone else would need to add my solution to his software, and the code is getting bigger the same, so it is going to be very messy. I wanted to use the tree view instead, but I cannot find the way how to change the size of the elements. Can anyone suggest to me what can I do in this case, or maybe another way of solving this solution?

RE: Change the size of Tree View elements in Visual FoxPro

Miraziz, first of all, welcome to the forum (and to Visual Foxpro).

Before we talk about treeviews, let me pick up your point about needing the same code for several different forms and possibly for other developers. That is a classic use case for object orientation. In short, you create a class that contains the user interface elements that you need, along with the validation code. Once you have done that, you can drop the class onto any form, at which point the form will acquire all the functionality that you have defined.

I would think that your class would be based on a container class, which in turn would contain the labels or checkboxes or whatever else you need. However, that's just off the top of my head. It would need further analysis of the problem before going into any detail.

It would be well beyond the scope a forum post to explain how object orientation works and how to use it in VFP, but I strongly recommend that you at least read up on the subject and familiarise yourself with the concept.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: Change the size of Tree View elements in Visual FoxPro

Miraziz,
I favour Mike's remarks about to familiarise with object orientation. I also think that the API treeview is not such a good idea to be used with a tough-screen application. Please study the concept by Burkhard Stiller, he constructed a tree-view with pure VFP code, thus enabling you to make it with node size to a size which is workable with a tough-screen. https://myvfpblog.blogspot.com/2007/11/vfp-native-...
Stay healthy,
Koen

RE: Change the size of Tree View elements in Visual FoxPro

You can change the font size and name to be used in a Treeview control. When you add the control to the form, right-click on the control and then select the properties. This will open a new window with the properties that can be set; select the tab 'Font' and you can set the size. See the image below.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close