Print Page | Close Window

Loadicon method...

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=18693
Printed Date: 19 September 2024 at 2:58pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Loadicon method...
Posted By: sgrappatore
Subject: Loadicon method...
Date Posted: 20 July 2011 at 4:42am
from HELP LoadIcon Method
Public Sub LoadIcon (_
ByVal Path As String, _
ByVal Command As Long, _
As XTPImageState _ ByVal ImageState
)
I'm using Visual Foxpro 9.0 Sp2 then :
"xtpImageNormal" is equal to 0
"xtpImageDisabled" is equal to 1
I'm trying to upload images in the imagemanager control.
I have a pushbutton (oButton) and imagemanger control (oImagemanger) in my form then :
oImagemanager.LoadIcon("bmp\myicon.ico",1,0) && Normal Picture ID=1
oButton.icon=oImagemanager.getimage(1,32) && Everything ok
If I set the oButton.enabled= .f. the image is not disabled then I try this code
oImagemanager.LoadIcon("bmp\myicon.ico",2,1) && Picture disabled ID=2
oButton.icon=oImagemanager.getimage(2,32)
but It doesn't works. I got an error.
Please Help me..
Thanks for your interest.


-------------
Visual foxpro 9.0
Codejock 15.0.1



Replies:
Posted By: Aaron
Date Posted: 22 July 2011 at 11:29am
Hi,
 
I'm not a Foxpro user...
If you set .Enabled to False does the button show disabled state? Does the image disappear?
 
 
I tried with VB:
 
Loading image like this:
Me.ImageManagerMenu.Icons.LoadIcon App.Path & "\alarm.ico", 1, xtpImageNormal
The button has an image in 'normal' and disabled state
 
Loading image like this:
Me.ImageManagerMenu.Icons.LoadIcon App.Path & "\alarm.ico", 1, xtpImageDisabled
The button has NO image in normal state
 
So your attempt to load a second image doesn't do much. Why you got an error, I really don't know.
 
I know WLCABRAL in this forum uses FoxPro as well and maybe he know's what to do... Just send private message and maybe he has a solution Wink
 
Good luck
 
  


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: sgrappatore
Date Posted: 26 July 2011 at 9:47am
SOLVED !!!
In visual Foxpro, you must use this syntax to disable a Pushbutton and have disabled image:
pushbutton.OBJECT.enabled=.f.
pushbutton.enabled=.f. (disable only the control and not the image!)
 
Ciao  Wink
 
 


-------------
Visual foxpro 9.0
Codejock 15.0.1



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net