CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-07-2004, 02:34 AM   #1
Geeza
New Member
 
Join Date: Mar 2004
Posts: 11
Question Newbie UI Problem

Sorry if this is a really easy problem, but I'm having problems creating the UI layout I want. I have a tabular layout with 3 tabs. For the first tab I want a button layout as shown in the attached image. I've played around with various different layout options but after a few hours I still haven't got what I need. Could anyone shed any light on the code required to reproduce the UI shown in my attachment? Any help much appreciated
Attached Images
File Type: jpg button_layout.jpg (3.5 KB, 44 views)
 
Old 04-07-2004, 04:26 AM   #2
macaroniKazoo
Know-it-All
 
macaroniKazoo's Avatar
animator
 
Join Date: Jul 2003
Posts: 391
try using the rowColumnLayout command:
Code:
rowColumnLayout -numberOfColumns 2 -columnWidth 1 80 -columnWidth 2 85 -columnWidth 1 "both" 1 -columnAttach 2 "both" 1; button -l "butt1"; button -l "butt2"; button -l "butt3"; button -l "butt4"; setParent ..;


that should do it for ya
__________________
-:macaroniKazoo:-
 
Old 04-07-2004, 11:48 AM   #3
Geeza
New Member
 
Join Date: Mar 2004
Posts: 11
Thanks for the code macaroniKazoo. I tried it, but for some reason it resulted in only 2 buttons (one directly above the other). I think I may use form layout now as its probably the most flexible. I've just looked at it again and I think I've got that figured now. Thanks for your help though :-)
 
Old 04-09-2004, 06:13 PM   #4
Geeza
New Member
 
Join Date: Mar 2004
Posts: 11
I've managed to get the layout for the UI I wanted using the form layout but have run into another problem.

I have a textbox at the bottom of the layout which I want to display different information depending on which "?" button is pressed on the right hand side (i've attached a screenshot).

I've created code which does this, however the window is not updated automatically. I have to reload the script to get the new text string to display. Basically the buttons are changing the $textinput value but these changes are not reflected in the textbox until I close the script window and reload it.

My code is as follows:

int $helpno;
string $textinput[8] ={"test1", "test2", "test3", "test4", "test5", "test6", "test7", "test8"};
// Create Help Buttons
string $Help1 = `button -c ("$helpno = 1") -label "?"`;
string $Help2 = `button -c ("$helpno = 2") -label "?"`;
string $Help3 = `button -c ("$helpno = 3") -label "?"`;
string $Help4 = `button -c ("$helpno = 4") -label "?"`;
string $Help5 = `button -c ("$helpno = 5") -label "?"`;
string $Help6 = `button -c ("$helpno = 6") -label "?"`;
string $Help7 = `button -c ("$helpno = 7") -label "?"`;
string $Help8 = `button -c ("$helpno = 8") -label "?"`;
// Text box
string $Text = `scrollField -wordWrap true
-text $textinput[$helpno]
-font boldLabelFont
-editable false
-ec "myGetText()"`

I figure if there is a way to get the text window to refresh after a button changes the "$textinput" variable, that should solve the problem. Anyone got any ideas of how to do this or another approach to the problem ? Any help appreciated
Attached Images
File Type: jpg button_layout1.jpg (15.7 KB, 17 views)
 
Old 04-11-2004, 01:07 AM   #5
Geeza
New Member
 
Join Date: Mar 2004
Posts: 11
Sorted it now :-).. Just needed to name my scrollfield and create a global procedure to change the scrollfield variable..
 
Old 01-18-2006, 12:00 AM   #6
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:48 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.