IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

MATLAB Discussion :

MENU avec plusieurs colonnes


Sujet :

MATLAB

  1. #1
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut MENU avec plusieurs colonnes
    Bonjour,
    Je souhaiterais savoir si il est possible de faire un menu (fonction MENU) avec plusieurs colonnes?

    Merci d avance pour vos reponses,
    Cordialement

  2. #2
    Nouveau membre du Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Juillet 2011
    Messages
    56
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Aéronautique - Marine - Espace - Armement

    Informations forums :
    Inscription : Juillet 2011
    Messages : 56
    Points : 38
    Points
    38
    Par défaut
    Bonjour,

    Pourrais-tu nous donner un peu plus de détailles sur ce que tu souhaite réaliser ?

  3. #3
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut Complement
    En fait je souhaiterais utiliser la fonction menu comme cela
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    capteur=menu('Type de capteurs?  ','WPS1','WPS2','WPS3','HLS1',HLS2');
    Mais je voudrais mettre une colonne avec les 3 WPS et une colonne avec les 2 HLS.

    Je suis en train de voir si c est possible avec guide mais je galere!!!!

    Je sais pas si j ai été clair,
    Merci.

  4. #4
    Expert confirmé
    Avatar de tug83
    Homme Profil pro
    MATLAB Geek !
    Inscrit en
    Juin 2006
    Messages
    1 781
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 45
    Localisation : France, Alpes de Haute Provence (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : MATLAB Geek !
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2006
    Messages : 1 781
    Points : 4 039
    Points
    4 039
    Par défaut
    Si c'est bien clair et c'est une très bonne question.
    Avec la fonction menu , ce n'est pas possible
    Il faut que tu écrive toi même tes pushbuttons (via le GUIDe ou non)

  5. #5
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut
    Merci beaucoup pour tes reponses rapide.

    J ai fait un guide tout simple avec 3 push button.
    qund je lance la fonction comment je fait si je veux valider mon choix et que ce choix soit enregistrer dans une variable?

  6. #6
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut
    le code generer est le suivant
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    function varargout = popup_WPS(varargin)
    % POPUP_WPS M-file for popup_WPS.fig
    %      POPUP_WPS, by itself, creates a new POPUP_WPS or raises the existing
    %      singleton*.
    %
    %      H = POPUP_WPS returns the handle to a new POPUP_WPS or the handle to
    %      the existing singleton*.
    %
    %      POPUP_WPS('CALLBACK',hObject,eventData,handles,...) calls the local
    %      function named CALLBACK in POPUP_WPS.M with the given input arguments.
    %
    %      POPUP_WPS('Property','Value',...) creates a new POPUP_WPS or raises the
    %      existing singleton*.  Starting from the left, property value pairs are
    %      applied to the GUI before popup_WPS_OpeningFcn gets called.  An
    %      unrecognized property name or invalid value makes property application
    %      stop.  All inputs are passed to popup_WPS_OpeningFcn via varargin.
    %
    %      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
    %      instance to run (singleton)".
    %
    % See also: GUIDE, GUIDATA, GUIHANDLES
     
    % Edit the above text to modify the response to help popup_WPS
     
    % Last Modified by GUIDE v2.5 22-Jul-2011 10:48:17
     
    % Begin initialization code - DO NOT EDIT
    gui_Singleton = 1;
    gui_State = struct('gui_Name',       mfilename, ...
                       'gui_Singleton',  gui_Singleton, ...
                       'gui_OpeningFcn', @popup_WPS_OpeningFcn, ...
                       'gui_OutputFcn',  @popup_WPS_OutputFcn, ...
                       'gui_LayoutFcn',  [] , ...
                       'gui_Callback',   []);
    if nargin && ischar(varargin{1})
        gui_State.gui_Callback = str2func(varargin{1});
    end
     
    if nargout
        [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
    else
        gui_mainfcn(gui_State, varargin{:});
    end
    % End initialization code - DO NOT EDIT
     
     
    % --- Executes just before popup_WPS is made visible.
    function popup_WPS_OpeningFcn(hObject, eventdata, handles, varargin)
    % This function has no output args, see OutputFcn.
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
    % varargin   command line arguments to popup_WPS (see VARARGIN)
     
    % Choose default command line output for popup_WPS
    handles.output = hObject;
     
    % Update handles structure
    guidata(hObject, handles);
     
    % UIWAIT makes popup_WPS wait for user response (see UIRESUME)
    % uiwait(handles.figure1);
     
     
    % --- Outputs from this function are returned to the command line.
    function varargout = popup_WPS_OutputFcn(hObject, eventdata, handles) 
    % varargout  cell array for returning output args (see VARARGOUT);
    % hObject    handle to figure
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
    % Get default command line output from handles structure
    varargout{1} = handles.output;
     
     
    % --- Executes on button press in WPS3.
    function WPS3_Callback(hObject, eventdata, handles)
    % hObject    handle to WPS3 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in WPS1.
    function WPS1_Callback(hObject, eventdata, handles)
    % hObject    handle to WPS1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
     
    % --- Executes on button press in WPS2.
    function WPS2_Callback(hObject, eventdata, handles)
    % hObject    handle to WPS2 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)

  7. #7
    Rédacteur/Modérateur

    Avatar de Jerome Briot
    Homme Profil pro
    Freelance mécatronique - Conseil, conception et formation
    Inscrit en
    Novembre 2006
    Messages
    20 316
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations professionnelles :
    Activité : Freelance mécatronique - Conseil, conception et formation

    Informations forums :
    Inscription : Novembre 2006
    Messages : 20 316
    Points : 52 948
    Points
    52 948
    Par défaut
    Il faut spécifier l'action à effectuer dans chacun des Callback des boutons.

    Par exemple pour WPS1 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    % --- Executes on button press in WPS1.
    function WPS1_Callback(hObject, eventdata, handles)
    % hObject    handle to WPS1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
    assignin('caller','capteur','WPS1');
    delete(gcbf);
    ou

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    % --- Executes on button press in WPS1.
    function WPS1_Callback(hObject, eventdata, handles)
    % hObject    handle to WPS1 (see GCBO)
    % eventdata  reserved - to be defined in a future version of MATLAB
    % handles    structure with handles and user data (see GUIDATA)
     
    varargout{1} = 'WPS1';
    delete(gcbf);

    Vérifie bien que la propriété WindowStyle de l'objet Figure sur laquelle sont positionnés les bouton soit bien à Modal

  8. #8
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut
    Merci,

    Ou est ce qu on peux voir si la propriété WindowStyle de l'objet Figure est positionné sur Modal.

    J ai fait les modif et ca ferme bien mon popup mais par contre je n ai rien dans la variable varargout.

    En tout merci pour vos aides precieuses.
    Cordialement.

  9. #9
    Membre à l'essai
    Homme Profil pro
    Étudiant
    Inscrit en
    Mai 2011
    Messages
    42
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Étudiant
    Secteur : Bâtiment

    Informations forums :
    Inscription : Mai 2011
    Messages : 42
    Points : 20
    Points
    20
    Par défaut
    J ai trouvé pour la propriété WindowStyle de l'objet Figure.
    Je l ai passé en Modal.

    Par contre je n arrive pas a sortir la variable de mon choix (ex.WPS3 ) de ma fonction.

Discussions similaires

  1. Dropdown menu avec plusieurs colonnes UL
    Par PaRaDiGm dans le forum Mise en page CSS
    Réponses: 4
    Dernier message: 02/04/2015, 12h25
  2. menu vertical avec plusieurs colonne
    Par jessicaz dans le forum Balisage (X)HTML et validation W3C
    Réponses: 3
    Dernier message: 19/04/2009, 06h03
  3. [ComboBox] Combobox avec plusieurs colonnes
    Par madica dans le forum Windows Forms
    Réponses: 6
    Dernier message: 15/01/2007, 11h25
  4. Menu sur plusieurs colonnes
    Par Le Béru dans le forum AWT/Swing
    Réponses: 1
    Dernier message: 23/05/2006, 15h14
  5. Réponses: 1
    Dernier message: 04/05/2005, 11h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo