How to change the Callback function of a GUI button?
I would like to change the callback function associated with a GUI button dynamically in the programming way.
Here is the code piece I tried, but it does not seem to work:
const char* pstrLabelSaveJpeg = "SaveJpegCb";
SetCtrlAttribute(pahel_id, ctrl_id ,ATTR_LABEL_TEXT, pstrLabelSaveJpeg);
int CVICALLBACK SaveJpegCb(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
Solved!
Go to Solution.
The attribute you used is about the "label" of the button.
It is just an appearence attribute. You can write your own name on it, but that does not change the callback function.
You should change the ATTR_CALLBACK_FUNCTION_POINTER attribute, and you should not pass the function name as a string.
So your function call will look like this:
SetCtrlAttribute(pahel_id, ctrl_id, ATTR_CALLBACK_FUNCTION_POINTER, SaveJpegCb);
Of course, you have to declare the SaveJpegCb function somewhere above that line.
I think you have already done that.
S. Eren BALCI
www.aselsan.com.tr
Similar Messages
-
How to change the Partner function code in Quotation
Hi All,
We have a requirement that whenever a Quote is cancelled,
We need to change one of the function codes in the partner tab and also the user status should be changed.
Can anyone give a quick solution on this?
Your response will be appreciated.
Thanks in advance.
Regards,
RamyaYou will best implement this as an action (tx. SPPFCADM), which is called on changing the status to cancelled. In this action you can call a function module changing the partner functions using e.g. CRM_ORDER_MAINTAIN as the appropriate function module.
Regards, Kai -
How to change the Short text of a GUI Status .
Hi Guys ,
Can any one guide me on how to change the short text of an already existing GUI Status .
I have already tried doing these :Opened the GUI Status in change mode and changed the short texts of the Application tool bar ,
Menu Bar ,
Function Keys ,
thinking that this will update in the Short text .. but that didnt happen ...
Below is what I need ...
Requirement :
GUI Status : Status_001 .
Short Text : New GUI Status .
Change the Short Text to " Changed GUI Status ' .
Regards,
RanjitaHi Ranjita,
Do this...
go to SE80
Open the program.. open node GUI Status
Double click on the status you want to change
go to menu GOTO>ATTRIBUTES>STATUS
click on continue or simply enter
Here change the short text and continue or enter
activate it
Hope this helps..
Regards,
Kinshuk -
Our Apple ID is ok and functioning. However, I just came on as the IT for the group and cannot find how to change the name.
Assuming you mean the personal name associated with the account, as opposed to the login (which you can change if it's not an @icloud.com. @me.com or @mac.com address) you can change this at http://appleid.appla.com . Click on 'Manage your account' and then on 'Edit' next to 'Your name' and the name currently associated with the ID.
-
The thing is that i saw some videos, and search for options of how to change the audio port. And even apple says that i have to change it from system preferences, but when i try to change it, the option doesn't appear me.
-
How to create a callback function module
Hi all,
I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
looks like i am going in wrong way ... can any one please help ??Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
Take care,
Stephen -
How to implement a callback function using LabView's Call Library Function Node?
I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
me and I do not have the source code, just the .dll and .h files.
The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
this one out. I am using LabView 8.6.
The SDK.h deacribes the function as:
// Function: SdkSetPropertyEventHandler
SdkError SDKAPI SdkSetPropertyEventHandler(
SdkCameraRef inCameraRef,
SdkPropertyEvent inEvnet,
SdkPropertyEventHandler inPropertyEventHandler,
SdkVoid* inContext );
// Description:
// Registers a callback function for receiving status
// change notification events for property states on a camera.
// Parameters:
// In: inCameraRef - Designate the camera object.
// inEvent - Designate one or all events to be supplemented.
// inPropertyEventHandler - Designate the pointer to the callback
// function for receiving property-related camera events.
// inContext - Designate application information to be passed by
// means of the callback function. Any data needed for
// your application can be passed.
// Out: None
// Returns: Any of the sdk errors.
A separate header file called SDKTypes.h contains the following data:
typedef SdkUInt32 SdkPropertyEvent;
typedef SdkUInt32 SdkPropertyID;
typedef void SdkVoid;
typedef struct __SdkObject* SdkBaseRef;
typedef SdkBaseRef SdkCameraRef;
SdkPropertyEventHandler
typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
SdkPropertyEvent inEvent,
SdkPropertyID inPropertyID,
SdkUInt32 inParam,
SdkVoid * inContext );
Thanks for your help.
Alejandro
Solved!
Go to Solution.alejandroandreatta wrote:
I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
me and I do not have the source code, just the .dll and .h files.
The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
this one out. I am using LabView 8.6.
Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
Rolf Kalbermatter
Message Edited by rolfk on 02-11-2009 08:00 PM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
dear, there.
how to change the default search engine? I accidentaly change it from google to yahoo, and I can't get it back. I changed my homepage to google too, but it isn't solved. ThanksClarification:
I believe now you potentially lose all extensions, plug-ins when you use the new reset function, but you will let me know.
If that is the case, your find corrupt file method maybe better. However, I reviewed the two help articles and there appear to be more files than just the delete search.json file and a possible search.sqlite file in the Firefox Profile Folder. I am confused. Then I have to find the folders. I think help articles mentioned how to find the profile containing the files, but not sure. -
How to remove the sort function on the drill down and then save
how to remove the sort function on the drill down and then save in the change local view of the Query
Is it possible to change the porperties of any characteristic in the local view and then save?
If so please post the answer.I do not think that option is possible.
Regards,
Venkata Boga. -
How to change the frequency of pulse train on the fly using an array of values?
Hi all!
First I want to thank U for the great job you are doing for this forum.
Iam still busy trying to control a stepper motor, by sending pulses from my E-series 6024 to a compumotor s6- stepper Driver. I've managed to get it working. I desperately need to control the motor using the values from an array. I believe we can use two approaches for that:
1st - I can get an array of the "numbers of pulses". Each element must run for 10 milliseconds. Using that we can calculate the array of frequencies to send the number of pulses within 10 milliseconds for each specific element. Could we use the arrays of "number of pulses" and frequencies in a "finite pulse train " and up
date with each element every 10 millisecond?
2nd - Or Could we use of the frequency array in a "continuous pulse train vi" and update it every 10 milliseconds?
Please note that I must use the values as they are.
Can someone please built a good example for me? Your help will be appreciated.
Regards
Chris
Attachments:
number_of_steps.txt 17 KB
frequency.txt 15 KBTiano,
I will try to better explain the paragraph on LabVIEW. The original paragraph reads ...
"While in a loop for continuous pulse train generation, make two calls to Counter Set Attribute.vi to set the values for "pulse spec 1" (constant 14) and "pulse spec 2" (constant 15). Following these calls you would make a call to Counter Control.vi with the control code set to "switch cycle" (constant 7). The attached LabVIEW programs demonstrate this flow."
You can make two calls to Counter Set Attribute or you can make a call to Set Pulse Specs which, if you open this VI, you will see that it is just making two calls to Counter Set Attribute. What you are doing with the Counter Set Attribute VIs is setting two registers called "pulse s
pec 1" and "pulse spec 2". These two registers are used to configure the frequency and duty cycle of your output frequency.
The example program which is attached to this Knowledge Base demonstrates how to change the frequency of a continuous generation on the fly. Why continuous? Because changing the frequency of a finite train would be easy. When the train completes it's finite generation you would just change the frequency and run a finite train again. You would not care about the time delay due to reconfiguration of the counter.
If you would like to change the frequency of the pulse train using a knob, this functionality will have to be added in the while loop. The while loop will be continuously checking for the new value of the knob and using the knob value to set the pulse specs.
LabVIEW is a language, and as with learning all new languages (spoken or programatic) there is a lot of learning to be accomplished. The great thing is that LabVIEW is much easier than mo
st languages and the learning curve should be much smaller. Don't fret, you'll be an expert before you know it. Especially since you're tackling a challenging first project.
Regards,
Justin Britten -
How to change the date format?
Hi,
I need to display the data format as(YYYY-MM-DD). But now it displays(2009-1-9)
Here is my code snippet which i used to display the data format as(2009-1-9)
*<INPUT TYPE=TEXT NAME="date_submitted" MAXLENGTH=20 SIZE=10 VALUE="" onBlur= "return dateSubmitted()"> (YYYY-MM-DD)*
*<SCRIPT LANGUAGE="javascript">*
dateSubmitted()
*</SCRIPT>*
function dateSubmitted()
if (document.pgUpdate.date_submitted.value == "")
date = new Date();
month = date.getMonth() + 1
document.pgUpdate.date_submitted.value =
date.getYear() + "-" + month + "-" + date.getDate();
return true;
Can anybody help me how to change the date format?
Thanks in advance!prit123 wrote:
use SimpleDateFormat class. The code is :He posted a Javascript related question, not a Java related question.
Please use forums devoted to Javascript. You're here at a Java/JSP forum.
There are JS forums at webdeveloper.com and dynamicdrive.com. Good luck.
String formatPattern = "yyyy-mm-dd";
SimpleDateFormat sdf = new SimpleDateFormat(formatPattern);
sdf.format(yourdate);yyyy-mm-dd denotes year-minutes-days. Please go read the SimpleDateFormat API as well. -
How to change the default workspace polling behaviour
Here are the instructions on how to change the polling interval in workspace:
The workspace source project is usually under (C:\Adobe\Adobe LiveCycle ES2\LiveCycle_ES_SDK\misc\Process_Management\Workspace)
The file that needs to be modified is SessionManager.as and is under (C:\Adobe\Adobe LiveCycle ES2\LiveCycle_ES_SDK\misc\Process_Management\Workspace\ws\Workspace\foundation\src\lc\fou ndation)
Set the value in a javascript file and then read this from the Workspace app. You can see an example of this in the same createChannelSet() method wrt the “enableSmallMessages” variable. To do this:
1- Add the following lines to the workspace-config.js file right after the enableSmallMessages var definition (the js file is in the sdk under (C:\Adobe\Adobe LiveCycle ES2\LiveCycle_ES_SDK\misc\Process_Management\Workspace\ws\Workspace\ui\html-template\js) – note that my example sets it to 10 seconds:
1- Then in the createChannelSet() method, define a new var with the same name and type=Number and default it to 3000 (to be consistent with the current behaviour):
var pollingInterval:Number = 3000;
2- Then, in the existing block where ExternalInterface.available is true, add the line to read the new value from the js file like this:
pollingInterval = ExternalInterface.call(“pollingInterval”);
3- Set pollingInterval on the channel with:
channel.pollingInterval = pollingInterval;
4- Add this function to the workspace-config.js file
// pollingInterval is the channelset polling interval in millisecs
function pollingInterval()
return 10000;
Compile this code and rebuild the workspace war, making sure the war contents contain the updated js file too, and then the polling interval will be read from the js file, making it much easier to change.
Here is the doc on how to customize workspace: http://help.adobe.com/en_US/livecycle/9.0/customizeworkspaceui.pdfChanging the Workspace Polling intervals just got a whole lot easier. Go to http://blogs.adobe.com/ADEP/2011/08/workspace-polling-in-adep.html for more info.
-
How to change the colour of chart in WAD.
Hi,
I have problem with web report. The web report with bar charts used to show with different colours earlier. Now when I execute the web report, the chart displays in single colour (All the rectangular bars in the charts are displayed in single colour say for example red). customer would like to see the chart with different colours. Please put some lights on it how to change the colour of chart in the report.
Thanks,
Sravan.Hi Krish,
I have followed the steps which you suggested, but I am unable to see the changes when I execute the web report.
I could able to see the colour changes to the bars in the chart in the preview (i.e when I select the series 1 and change the colour for series 1 under Area properties). Like that I have done for all the 5 series, then I have clicked on Complete button, saved the web template and executed it, and I could able to see the changes in the preview but not in the report after execution.
I have two charts in my case, one is <b>Job function</b> chart and the other is <b>Job type</b> chart. The Job function chart is displaying with different colours from the begining, but the job type chart is displays all the columns in RED colour.
Is there any setting I need to do after selecting the colour at the series level.
Please correctt me if I am worng in doing the procedure.
Please update me how to do it...It is usefull if you can come back to me ASAP .
Thanks,
Saravanan.
Message was edited by:
SARAVANAN PAYANI
Message was edited by:
SARAVANAN PAYANI
Message was edited by:
SARAVANAN PAYANI -
How to change the color of specific row in ALV tree
Hi,
I m using method set_table_for_first_display of a class CL_GUI_ALV_TREE.
The req is to change the color of specific row. Now can anybody tell me how to change the color of ALV tree. As in ALV tree and in this method 'set_table_for_first_display', there is no parameter IS_Layout.
Pls suggest...hi
hope this code will help you.
Reward if help.
REPORT zsharad_test1.
TABLES: ekko.
TYPE-POOLS: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
line_color(4) TYPE c, "Used to store row color attributes
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gd_tab_group TYPE slis_t_sp_group_alv,
gd_layout TYPE slis_layout_alv,
gd_repid LIKE sy-repid.
*Start-of-selection.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_fieldcatalog.
PERFORM build_layout.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
FORM build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-datatype = 'CURR'.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
APPEND fieldcatalog TO fieldcatalog.
CLEAR fieldcatalog.
ENDFORM. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
FORM build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
Set layout field for row attributes(i.e. color)
gd_layout-info_fieldname = 'LINE_COLOR'.
gd_layout-totals_only = 'X'.
gd_layout-f2code = 'DISP'. "Sets fcode for when double
"click(press f2)
gd_layout-zebra = 'X'.
gd_layout-group_change_edit = 'X'.
gd_layout-header_text = 'helllllo'.
ENDFORM. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
FORM display_alv_report.
gd_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
IT_EVENTS = GT_XEVENTS
i_save = 'X'
is_variant = z_template
TABLES
t_outtab = it_ekko
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
DATA: ld_color(1) TYPE c.
SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekko.
*Populate field with color attributes
LOOP AT it_ekko INTO wa_ekko.
Populate color variable with colour properties
Char 1 = C (This is a color property)
Char 2 = 3 (Color codes: 1 - 7)
Char 3 = Intensified on/off ( 1 or 0 )
Char 4 = Inverse display on/off ( 1 or 0 )
i.e. wa_ekko-line_color = 'C410'
ld_color = ld_color + 1.
Only 7 colours so need to reset color value
IF ld_color = 8.
ld_color = 1.
ENDIF.
CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
wa_ekko-line_color = 'C410'.
MODIFY it_ekko FROM wa_ekko.
ENDLOOP.
ENDFORM. " DATA_RETRIEVAL -
How to change the text of customer tab in Me23n
Hi
I have added new customer tab in Me23n at item level.
Its text is Customer Data.
I would like to change to some other text.
How to change the text of customer tab in Me23n
Regards
AmrutaAmruta,
I had the same query today and finally found the answer.
In order to change the title text or description of the "Customer Data" tab in ME23N, etc. you need to define a new text symbol in program SAPLXM06. The text symbol must be number 111 for the PO data. Make sure you define this text symbol in the language you are using when viewing the PO. I had issues with this as the original language of object SAPXM06 is not my logon language.
The standard code which picks up this text is in function module MEGUI_BUILD_PO_ITEM_PLUGIN. I could not find any documentation around this functionality.
Hope this helps!
Ben
Maybe you are looking for
-
IBAN cannot be generated -- Message no. BF00012
Hi experts I have a problem. Normally when i run the transaction PA30, i add the bank details and the system generate the IBAN automatic. and if i go to the transaction FK01 i add the IBAn and the system generate the bank details automatic. My proble
-
All of my songs have exclamation points next to them but when I go to my iTunes media folder to find the files, there is nothing in the folders. Any idea what happened and how I can get my music back?
-
(1) Dynamic rule accepts only Accountand view in the left hand side. What is the intersection that it writes to? (2) Given the syntax and other limitations ( e.g it can refer only to the same subcube) are there any benefits of using dynamic over HS.E
-
Problem with Business Component Browser
I'm using JDeveloper 11g 11.1.1.0.2 on Windows XP. I'm trying to test a view object. I've created an application module, right click on the module and click on run. The "Select Business Components Configuration" dialog box pops up, I accept the defau
-
Mac mail will not add new accounts
Hi, Recently I added two new email accounts to my mac Mail Then the account started acting weird a few days ago-not letting me email myself (to a gmail account), refusing to put the email in the address field. Thats the email associated with my compu