OutLookNavBar Unknown Member Themes?

Topics: General
Sep 15, 2008 at 5:52 PM
Hi,

I'm interested in using your themed controls but seem to be having a problem getting it to work.  I hope this is the correct forum for support issues.

I dropped the OutlookNavBar onto my form, from the ThemedControls.vcx, setup all the extra files as described in the help document, I activated one page and simply put a label object on it for testing purposes.  When I run my form I get the following error:

Unknown member THEMES

When I hit suspend and go look at the code in the debugger it points to the following line in the getmember method of the themesmanager class.
Return Evaluate("This.Themes.Item(This.ActiveTheme)."+m.lcMemberName)

I was able to get the sample to work so I'm guessing I just have something miss-configured, just not sure what yet. 

Any suggestions as to how I can resolve this issue?  What am I missing?

Thanks in advance,
Linn

P.S. I'm running VFP 9.0 sp1 on a Windows XP Pro computer which is patched to sp2.

Developer
Sep 16, 2008 at 3:43 PM
Hi Linn!
What ThemedControls version are you using?
Have you saved the Themes.xml file in the same folder of your exe and added it to the project (marked as excluded)?

Emerson
Sep 17, 2008 at 2:52 PM
Hi Emerson,

I downloaded the current ThemedControls off this web site.  I discovered that I had to save the Themes.xml file in the root directory of my project and I did add it to the project marked as excluded.  I haven't compiled the project at all yet, just evaluating these tools.

I'm finding now that there are some graphics anomalies on my system, Windows XP sp2, one of them being that I can't seem to get the pictures to work.  In the Pane object I entered the path and file name of the image I wanted to use but it just shows an X through the object at run time.  I've tried every pathing option I can think of and nothing seems to work.  I have a standard directory structure for my VFP applications that I would prefer to use but guess this is the source of this issue.  Haven't found a way around it yet.

My directory structure is as follows:
\VFP\<project folder>\<subdirectories for the various types of components>

In this case:
\VFP\testing\apps
\VFP\testing\classes
\VFP\testing\forms
\VFP\testing\images
\VFP\testing\programs
\VFP\testing\reports
\VFP\testing\textfiles

All the classes when into the class folder and all the *.png files from the example went into the images folder.  I added them all to the project similar to the original sample, which I do have working.

Any thoughts on how I can successfully reference the images?

Thanks,
Linn

Developer
Sep 17, 2008 at 7:22 PM
Edited Sep 17, 2008 at 7:24 PM
Linn,

Are you specifying the complete path?
For example: C:\VFP\testing\images\yourimage.png

This is happening when you run your app inside VFP IDE?
Sep 17, 2008 at 8:18 PM
Emerson,

Yes I tried that, although it's on a network drive which is mapped to H:.  It's currently H:\VFP\TESTING\IMAGES\EMAIL16.PNG.

This should work, right?

Thanks,
Linn
Developer
Sep 19, 2008 at 6:48 PM
Linn,

>> This should work, right?
I don't know.
Never tried with a mapped drive.

Have you tried to add this path to Set Path and just place the image name in the pane's picture properties?
Something like this: Set Path To ("H:\VFP\testing\images") Additive

These images are included in your exe?
If yes, you'll need to exclude them from your project and distribute them with your exe in order to work correctly.

Regards,

Emerson
Sep 22, 2008 at 4:55 PM
Emerson,

I checked and I am adding the images directory to the path.  I have not compiled my program yet, just running it in VFP.  But I have all the images listed in the Others tab and they are all marked excluded.

I have also noticed that the splitter bar object isn't being located correctly either.  I have to adjust it manually up and down to see all the buttons.

Thanks,
Linn

Developer
Sep 23, 2008 at 11:25 AM
Linn,

I really don't understand why this is happening.
Maybe you accidentally overrided some class behavior placing code in any method without use the DoDefault() to ensure that the class code will be executed?
Have you tried to place a standard VFP image control and set the picture property programmatically (not typing in property window) to the same image that you are using in OutlookNavBar?
Could you send me a sample form reproducing the error to check whats happening?

About the wrong initial splitter position, currently, you cannot change the default height of OutlookNavBar. This is a known issue that I expect to fix in a future version.
You'll need to create your form based on the OutlookNavBar height and maximize it at run time.

Emerson
Sep 23, 2008 at 2:29 PM
Emerson,

Ok, looks like I found where I went wrong.  I started with my own form, I didn't notice there was a ThemedForm class I needed to use.  I created a new form based on the ThemedForm and it's working now.  It's always something simple once you see the solution.

One of the features I was actually looking for, however, is the vertical bar to the right of the ThemedOutlookNavBar.  I would like to be able to adjust it's width at run time.  Any suggestion as to how to implement that, or is that a big job?

Is it possible to change the theme without having to change the themes of the whole computer?

Thanks much,
Linn


Developer
Sep 24, 2008 at 4:25 PM
Linn,

>> Ok, looks like I found where I went wrong.  I started with my own form, I didn't notice there was a ThemedForm class I needed to use.  I created a new form based on the ThemedForm and it's working now.  It's always something simple once you see the solution.

Great!
But you really don't need to use ThemedForm to make any of ThemedControls work.
They are independent.

>> One of the features I was actually looking for, however, is the vertical bar to the right of the ThemedOutlookNavBar.  I would like to be able to adjust it's width at run time.  Any suggestion as to how to implement that, or is that a big job?

What vertical bar are you referring?

>> Is it possible to change the theme without having to change the themes of the whole computer?

Yes.
Just set _Screen.ThemesManager.ActiveTheme to a value in a range from 1 to 6.

Cheers!

Emerson
Sep 29, 2008 at 1:31 PM

Hi Emerson,


Sorry it has taken so long to reply, had a busy week last week.

I couldn't figure out how to use it without the ThemedForm form, could not get those images to load at all.  Once I used the ThemedForm class it worked right away.  I even tried going back and making my original form work by adding in missing pieces from the ThemedForm form but that just made it worse.

Regarding the vertical bar... take a look at Outlook Express, on the left is the folder list and on the upper right is the details list of the mail folder you select on the left, below that is the message pre-view you selected.  Between them are boarders, I call them bars, that can be moved back and forth to adjust the viewable size of the different parts of the screen.  That's the functionality I'd like to emulate in my application.  Or a simpler example is the Event Viewer application in the Administrative Tools of Windows XP.  There is a treeview object on the left and details on the right.

Thanks,

Linn

Developer
Oct 2, 2008 at 12:00 PM
Hi Linn!

>> Sorry it has taken so long to reply, had a busy week last week.
I'm also busy until the end of this year.

>> I couldn't figure out how to use it without the ThemedForm form, could not get those images to load at all.  Once I used the ThemedForm class it worked right away.  I even tried going back and making my original form work by adding in missing pieces from the ThemedForm form but that just made it worse.

If it works now, don't touch the code anymore!   ; )

>> Regarding the vertical bar... take a look at Outlook Express, on the left is the folder list and on the upper right is the details list of the mail folder you select on the left, below that is the message pre-view you selected.  Between them are boarders, I call them bars, that can be moved back and forth to adjust the viewable size of the different parts of the screen.  That's the functionality I'd like to emulate in my application.  Or a simpler example is the Event Viewer application in the Administrative Tools of Windows XP.  There is a treeview object on the left and details on the right.

Now I understand.
I have a horizontal splitter in OutlookNavBar, but it has an specific implementation and you'll not be able to use it.
I think that you can check this classes: one from Christof Wollenhaupt and another from Gerald Santerre.
Maybe you can accomplish what you want using one of them.

Cheers.

Emerson