|
Home > Archive > dBASE Code Sharing > June 2005 > help is needed for sure...
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
help is needed for sure...
|
|
| Imar B DaCunha 2005-06-16, 7:23 am |
| Hi everyone, I am trying to execute events from a treeView object menu in
one of my forms, however I have never use the treeView control.
Can some one help me out here.
Example:
I would like to click (or high light) in a particular treeItem and open
another form per example etc. or do some thing else.
A small piece of code would help me a lot, since I still struggle with the
English language to this day.
Thanks in advance
Benttini
| |
| Andrew Shimmin 2005-06-16, 7:23 am |
| Benttini,
Have a look in dBase.binaries for "TreeFunctions for Dennis & Maxine Levy" on 27-Apr-2005
regards, andrew
Imar B DaCunha wrote:
> Hi everyone, I am trying to execute events from a treeView object menu in
> one of my forms, however I have never use the treeView control.
> Can some one help me out here.
> Example:
> I would like to click (or high light) in a particular treeItem and open
> another form per example etc. or do some thing else.
> A small piece of code would help me a lot, since I still struggle with the
> English language to this day.
>
> Thanks in advance
> Benttini
>
>
| |
| Rick Miller 2005-06-16, 7:23 am |
| Hello Benttini,
additional to Andrew's post,
below is a snippet of code.
Rick Miller
"Imar B DaCunha" <idacunha@nc.rr.com> wrote in
news:EpFkJ0hcFHA.1768@news-server:
> Hi everyone, I am trying to execute events from a treeView object
> menu in one of my forms, however I have never use the treeView
> control. Can some one help me out here.
> Example:
> I would like to click (or high light) in a particular treeItem
> and open
> another form per example etc. or do some thing else.
> A small piece of code would help me a lot, since I still struggle
> with the English language to this day.
----
/*
because the treeItem object has no events
to work with, You would normally use
an event of the parent (treeView) object.
The example code below would be linked to
the treeView object's onLeftDblClick event.
*/
//-------------------------------------------------//
// treeView method, linked to onLeftDblClick event.
// either start a new form or do the default.
function treeView1_onLeftDblC
lick(flags, col, row)
// private variable used cuz of the type function.
private oItem
oItem = this.getItemByPos(col, row)
if type("oItem") == "O"
// a treeItem is selected.
Local cText
// store the current treeItem's text property
// to cText to simplify the if/endif construct.
cText = "" + oItem.text
// start a new form based upon
// the currently selected treeItem.
if cText == "New Customer"
do newCustomer.wfm
elseif cText == "Preferences"
do preferences.wfm
else
// perform the default behavior
// for a leftDblClick.
if oItem.noOfChildren > 0
// there is something to do.
if oItem.expanded
// already expanded, roll it up.
oItem.expanded := false
else
// not expanded, roll it down.
oItem.expanded := true
endif
else
// nothing to do.
endif
endif
else
// no treeItem is selected.
endif
return
| |
| Ken Mayer [dBVIPS] 2005-06-16, 11:24 am |
| Imar B DaCunha wrote:
> Hi everyone, I am trying to execute events from a treeView object menu in
> one of my forms, however I have never use the treeView control.
> Can some one help me out here.
> Example:
> I would like to click (or high light) in a particular treeItem and open
> another form per example etc. or do some thing else.
> A small piece of code would help me a lot, since I still struggle with the
> English language to this day.
Please use this newsgroup to share code with other developers. For help,
you probably should have used d.programming ...
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
|
|
|
|
|