Recent

Author Topic: Kol-CE diff. windows32 - wince  (Read 13074 times)

aji

  • New Member
  • *
  • Posts: 13
Kol-CE diff. windows32 - wince
« on: October 31, 2007, 06:42:25 pm »
Before I try to convert my c# projects for my Pocket PC to Free Pascal, I'm going through the components to see what properties they have, and testing out the code.
I realize there will  be differences between the two operating systems, but is there a list to quickly scan to see if something is supported on the wince platform or not?

I.e. I tested the kol-ce treeview, and was unable to see the checkboxes in the treeview on wince. Under options I changed tvoCheckBoxes to true. In win32 it worked just fine. Considering this worked for me in c# on wince, I don't understand why it doesn't work now.
I also looked to the kol.pas for clarification. According to that file there is this statement

{$ifdef win32}TVS_NOTOOLTIPS, TVS_CHECKBOXES, TVS_TRACKSELECT, TVS_SINGLEEXPAND, TVS_INFOTIP, TVS_FULLROWSELECT, TVS_NOSCROLL, TVS_NONEVENHEIGHT
{$else}0, TVS_CHECKBOXES, 0, TVS_SINGLEEXPAND, 0, 0, 0, 0
{$endif win32});
which to me would indicate it should have checkboxes in wince.

Any ideas?

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
RE: Kol-CE diff. windows32 - wince
« Reply #1 on: November 01, 2007, 01:22:09 am »
Found info here: http://www.pocketpcdn.com/articles/checktree.html
By some reason the tree control shows checkboxes only when an image list is assigned. If you do not need images in the tree control you can create a dummy image list with images that look like checkboxes.

And from Pocket PC SDK Help:
TVS_CHECKBOXES: Enables items in a tree view control to be displayed as check boxes. This style uses item state images to produce the check box effect.  

Pocket PC SDK Help and Google will help to find out which features are supported on wince and which are not supported.

aji

  • New Member
  • *
  • Posts: 13
Treeview checkbox
« Reply #2 on: November 01, 2007, 04:43:41 pm »
The article you refer to is from 2002. Since then, Microsoft fixed the problem such that you don't have to add an imagelist in order to show the checkboxes on the Pocket PC.

This is the code from my MainForm.Designer.cs file that makes the checkbox:
"this.treeView1.CheckBoxes = true;"
There is no code in my program with an imagelist.
If I had a server, I would show you a screen capture of the tree with checkboxes, but since I don't, you just have to take my word for it :)

Is it possible that the Kol-ce files references an old version, and not the most current?
I also noticed that using the LCL components in Lazarus, there isn't even an option in win32 to use checkboxes.

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
RE: Treeview checkbox
« Reply #3 on: November 01, 2007, 07:13:13 pm »
There are no many changes since 2002 in Pocket PC basic API.
.NET framework can do lot of background work depending of platform to support some features.
"this.treeView1.CheckBoxes = true;" tells nothing about how it really works.

aji

  • New Member
  • *
  • Posts: 13
treeview checkbox
« Reply #4 on: November 01, 2007, 09:17:30 pm »
Thanks for your reply.
As you probably understand I don't know too much about the API. I just thought that if it worked in C#, it should work in other languages too since they use the same controls.
The program was developed in Sharpdevelop, and if you need further info as to  how I got the checkbox, let me know what details you need.
So what you are saying, is that the checkbox feature is programmed into the c# framework and not part of the control itself?
If I use the imagelist, it means I can't have both a checkboximage and another image, as I currently do in my program?
I thought the treeview control was part of the common control dll and as such constantly updated as part of new releases?

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
RE: treeview checkbox
« Reply #5 on: November 02, 2007, 12:32:42 am »
Combobox images are assigned as state images. Usual images can be used together with state images.
Just create imagelist with 2 checkbox images and assign it as ImageListState for treeview. ImageListNormal can be used for normal images.

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
RE: treeview checkbox
« Reply #6 on: November 02, 2007, 12:55:22 am »
I tested checkboxes in treeview and found that thay perfectly work if you set ImageListNormal for treeview and set tvoCheckBoxes option.

aji

  • New Member
  • *
  • Posts: 13
Treeview Checkbox
« Reply #7 on: November 02, 2007, 05:25:16 pm »
Thank you so much!

 

TinyPortal © 2005-2018