I created a for loop using uicontrol for creating pushbuttons as number of pushbuttons vary dynamically. here is my code:
for j = 1: length(ConnectionObjectProperties(1,:)) X(j) = uicontrol('parent',Window23,'Tag','SelectedConnectionObject',... 'Style','pushbutton',... 'String',ConnectionObjectProperties(1,j),... 'Position',[300 (600-80*j) 100 30],... 'callback',@DisplayConnectionObjectProperties);end
when ever I calling 'string' handle in the callback function, It displays all the names saved in 'ConnectionObjectProperties' ,I want to know the pushbutton which is pressed or string which is saved againt that particular pushbutton.
ConnectionObjectProperties is in cell format
can you please help me.
thank you
Best Answer