CJPushButton Image
Re: CJPushButton Image
Sorry, I didn't get to it. I'll try today.
The eXpress train is coming - and it has more cars.
Re: CJPushButton Image
Hi Roger,
Did you find time to check this?
If you don't have the time, I can use the current possibilities. I want to incoporate these buttons in my application. I just don't want to add them and to see a that it can be done with one command-line a week later.
If it is not planned in the first weeks, I won't wait, otherwise I wait for a modification on xcodejock.
Did you find time to check this?
If you don't have the time, I can use the current possibilities. I want to incoporate these buttons in my application. I just don't want to add them and to see a that it can be done with one command-line a week later.
If it is not planned in the first weeks, I won't wait, otherwise I wait for a modification on xcodejock.
Re: CJPushButton Image
Chris -
I looked into this and thought that it may be more of a problem than it is worth but now I realize I may have been on the wrong track.
The Pushbutton control requires using the GlobalSettings object to load the bitmaps or icons if you want to use images in markup.
Now after looking at the specs again, I think I can do what you want but you cannot use images in markup text.
I'll work on it again today.
Roger
I looked into this and thought that it may be more of a problem than it is worth but now I realize I may have been on the wrong track.
The Pushbutton control requires using the GlobalSettings object to load the bitmaps or icons if you want to use images in markup.
Now after looking at the specs again, I think I can do what you want but you cannot use images in markup text.
I'll work on it again today.
Roger
The eXpress train is coming - and it has more cars.
Re: CJPushButton Image
Ok, I finally figured out a seamless way to handle this problem.
The attached file contains a new sample pushbutton program and updated XCodeJock source.
Copy XCJCLASS.PRG and XCODEJOCK.PRG to \exp19\source\xcodejock.
Copy XCODEJOCK.CH to \exp19\include
Copy PUSHBUTTON.PRG to \exp19\XCodeJock\Samples\SuiteControls\Pushbutton
Rebuild XCodeJock.Dll by running \exp19\source\xcodejock\build19_sl1.bat.
You will still need to create a SuiteControlGlobalSettings object if you intend to use images in markup text, so you will see this in the sample program, but you will not need it to attach regular icons or bitmaps.
The attached file contains a new sample pushbutton program and updated XCodeJock source.
Copy XCJCLASS.PRG and XCODEJOCK.PRG to \exp19\source\xcodejock.
Copy XCODEJOCK.CH to \exp19\include
Copy PUSHBUTTON.PRG to \exp19\XCodeJock\Samples\SuiteControls\Pushbutton
Rebuild XCodeJock.Dll by running \exp19\source\xcodejock\build19_sl1.bat.
You will still need to create a SuiteControlGlobalSettings object if you intend to use images in markup text, so you will see this in the sample program, but you will not need it to attach regular icons or bitmaps.
- Attachments
-
- pushbutton.zip
- (32.83 KiB) Downloaded 1617 times
The eXpress train is coming - and it has more cars.
Re: CJPushButton Image
Hi Roger,
The sample is working with a bitmap file. I would like to use it with a bitmap from resources.
I modified the following in xjclass.prg
This way it is working with a bitmap from resources. I suppose the same has to be done when using icons.
The sample is working with a bitmap file. I would like to use it with a bitmap from resources.
I modified the following in xjclass.prg
Code: Select all
IF !Empty(aOptions[24])
if valtype(aOptions[24]) == "C"
CJLoadBitmap aOptions[24] ID 1 STATE xtpImageNormal PARENT ::globalSettings:icons
oIcon := ::globalSettings:icons:getImage(1,32)
::picture := CJ_Picture(oIcon,xtpImageNormal)
endif
if valtype(aOptions[24]) == "N"
aResFile := DC_BitmapResourceFile()
FOR i := 1 TO Len(aResFile)
nHandle := aResFile[i]
CJLoadBitmapFromResource aOptions[24] HANDLE nHandle ID 1 STATE xtpImageNormal PARENT ::globalSettings:icons
oIcon := ::globalSettings:icons:getImage(1,32)
::picture := CJ_Picture(oIcon,xtpImageNormal)
next
endif
ENDIF