print menu in uicontrol

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

print menu in uicontrol

Octave - General mailing list
hi,
i try to write a large text but i see text truncked in panel

  function canczz()
%made by luca..preso spunto dagli esempi
%https://octave.1599824.n4.nabble.com/UI-element-td4694936.html

%http://ss2.eecs.umich.edu/matlab/ulaby_matlab.html
 
%mi crea una interfaccia grafica per consentire le variazioni sul momento a
scopo di testare i vari settaggi e altro..
%N.B. una volta che cambio tramite interfaccia gui %i valori di
OutSamplePosticipa(e confermo con PredatorPreset)
% e VisualGraphPost(muovendo lo slider)  questi mi rimangono come valori
nuovi ..Quindi se poi torno in predatorVectorized e eseguo i grafici
%a mano questi rimangono con le nuove impostazioni anche se in excelSetting
c'e ne sono altri impostati di default!!!
%Stessa cosa se eseguo PredatorPreset e li cambio...mi rimane il nuovo
settaggio!
 
  clf;
  createPanelDecription();
 % createPlot();
endfunction

function createPanelDecription
  figure('name','PredatorGuiPanelDescription');
   pos = [0 0 0.25 1];
 
   panel2 = uipanel ('position', pos, 'visible', 'off');
 
    if (exist('OCTAVE_VERSION', 'builtin'))
    dellistener(gcf, 'position');
    addlistener (gcf, 'position', {@resetControlPanel2, panel2, pos});
  end
global Instrument;

str="this a demo !!! this a demo !!!this a demo !!!this a demo !!!this a
demo !!!this a demo !!! this a demo !!!this a demo ";
  uicontrol (panel2, "style", "text", "string", str, "position",[10 800 300
40])

 pos=800;

endfunction

function resetControlPanel2(s, e, p, pos)
  %p = guiState('cpanel');
  set(p, 'visible', 'off');
  set(p, 'position', [0 0 1 1]);
  set(p, 'position', pos);
  set(p, 'visible', 'on');
endfunction


OUTPUT:

https://gyazo.com/af54b15c868c9808d5cdecfbf87577c0







--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: print menu in uicontrol

siko1056
On 1/4/20 4:37 AM, shivax via Help list for GNU Octave wrote:

> hi,
> i try to write a large text but i see text truncked in panel
>
>   function canczz()
> %made by luca..preso spunto dagli esempi
> %https://octave.1599824.n4.nabble.com/UI-element-td4694936.html
>
> %http://ss2.eecs.umich.edu/matlab/ulaby_matlab.html
>  
> %mi crea una interfaccia grafica per consentire le variazioni sul momento a
> scopo di testare i vari settaggi e altro..
> %N.B. una volta che cambio tramite interfaccia gui %i valori di
> OutSamplePosticipa(e confermo con PredatorPreset)
> % e VisualGraphPost(muovendo lo slider)  questi mi rimangono come valori
> nuovi ..Quindi se poi torno in predatorVectorized e eseguo i grafici
> %a mano questi rimangono con le nuove impostazioni anche se in excelSetting
> c'e ne sono altri impostati di default!!!
> %Stessa cosa se eseguo PredatorPreset e li cambio...mi rimane il nuovo
> settaggio!
>  
>   clf;
>   createPanelDecription();
>  % createPlot();
> endfunction
>
> function createPanelDecription
>   figure('name','PredatorGuiPanelDescription');
>    pos = [0 0 0.25 1];
>  
>    panel2 = uipanel ('position', pos, 'visible', 'off');
>  
>     if (exist('OCTAVE_VERSION', 'builtin'))
>     dellistener(gcf, 'position');
>     addlistener (gcf, 'position', {@resetControlPanel2, panel2, pos});
>   end
> global Instrument;
>
> str="this a demo !!! this a demo !!!this a demo !!!this a demo !!!this a
> demo !!!this a demo !!! this a demo !!!this a demo ";
>   uicontrol (panel2, "style", "text", "string", str, "position",[10 800 300
> 40])
>
>  pos=800;
>
> endfunction
>
> function resetControlPanel2(s, e, p, pos)
>   %p = guiState('cpanel');
>   set(p, 'visible', 'off');
>   set(p, 'position', [0 0 1 1]);
>   set(p, 'position', pos);
>   set(p, 'visible', 'on');
> endfunction
>
>
> OUTPUT:
>
> https://gyazo.com/af54b15c868c9808d5cdecfbf87577c0
>
>

Your lengthy code suffered a lot by sending via email.  I cannot
reproduce the output.  Please send the code "canczz.m" as attachment to
this mailing-list, strip the non-English comments or translate if
necessary for understanding, and tell us:

1) What is your operating system?
2) Which version of Octave do you use?
3) What is the expected output?

HTH,
Kai



Reply | Threaded
Open this post in threaded view
|

Re: print menu in uicontrol

Octave - General mailing list
testOctave.m <https://octave.1599824.n4.nabble.com/file/t372898/testOctave.m>  


1) What is your operating system?
window 10 professional

2) Which version of Octave do you use?
5.1.0

3) What is the expected output?


I expect the display of the complete string



--
Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: print menu in uicontrol

siko1056
On 1/7/20 7:32 AM, shivax via Help list for GNU Octave wrote:

> testOctave.m <https://octave.1599824.n4.nabble.com/file/t372898/testOctave.m>  
>
>
> 1) What is your operating system?
> window 10 professional
>
> 2) Which version of Octave do you use?
> 5.1.0
>
> 3) What is the expected output?
>
>
> I expect the display of the complete string
>

Thank you for the details.  Unfortunately, I still have no clue, what
your program should do.  Please try to explain the respective code
lines.  For example, what should the listener function do?  Where do you
trigger it, that something should happen?

Another point is, I only see the string, if I make the following
modification:

   uicontrol (panel2, "style", "text", "string", str, "position",[10 80
300 40])

What should "pos = 800" in the end do?  This statement is without effect?

Best,
Kai