bb.donnay-software.com

Donnay Software Web Forums
It is currently Wed Dec 11, 2019 10:14 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: CJPushButton Image
PostPosted: Tue Jun 15, 2010 8:25 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4014
Location: Boise, Idaho USA
Sorry, I didn't get to it. I'll try today.

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: CJPushButton Image
PostPosted: Wed Jun 23, 2010 12:31 am 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 822
Location: Sijsele, Belgium
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.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
 Post subject: Re: CJPushButton Image
PostPosted: Wed Jun 23, 2010 7:14 am 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4014
Location: Boise, Idaho USA
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

_________________
The eXpress train is coming - and it has more cars.


Top
 Profile  
 
 Post subject: Re: CJPushButton Image
PostPosted: Thu Jun 24, 2010 4:19 pm 
Offline
Site Admin
User avatar

Joined: Wed Jan 27, 2010 6:58 pm
Posts: 4014
Location: Boise, Idaho USA
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.


Attachments:
pushbutton.zip [32.83 KiB]
Downloaded 335 times

_________________
The eXpress train is coming - and it has more cars.
Top
 Profile  
 
 Post subject: Re: CJPushButton Image
PostPosted: Wed Jun 30, 2010 10:08 pm 
Offline

Joined: Thu Jan 28, 2010 1:22 am
Posts: 822
Location: Sijsele, Belgium
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

Code:
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


This way it is working with a bitmap from resources. I suppose the same has to be done when using icons.

_________________
Best regards,

Chris.
www.aboservice.be


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group