Jump to content
Korean Random
SV_Kirov

Как создать форму(Окно) в ангаре

Recommended Posts

вот еще один вариант:

def test_print()
    str1 = "<table>"
    for i in rsp.get('data'):
        str1 += "<tr><td>Nickname: %s</td><td>Id: %s</td></tr>\n" % (i.get('nickname'), i.get('account_id'))
    return str1+"</table>"
Но лучший вариант - использовать CSS!

Утром напишу как это сделать.

 

Это было бы идеальна, спасибо что терпите меня с моими вопросами ))  

Share this post


Link to post

Short link
Share on other sites

вот еще один вариант:

def test_print()
    str1 = "<table>"
    for i in rsp.get('data'):
        str1 += "<tr><td>Nickname: %s</td><td>Id: %s</td></tr>\n" % (i.get('nickname'), i.get('account_id'))
    return str1+"</table>"
Но лучший вариант - использовать CSS!

Утром напишу как это сделать.

 

css это хорошо, не думал что его можно заюзать.

Share this post


Link to post

Short link
Share on other sites

, подскажи, пожалуйста, как кнопку "Закрыть" применить по назначению (на примере этого кода)?

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

CSS:

ul { list-style: none; }
li { display: inline-block; width: 49%; vertical-align: top; }
python:

def test_print()
    str1 = ""
    for i in rsp.get('data'):
        str1 += "<ul><li>Nickname: %s</li><li>Id: %s</li></ul>\n" % (i.get('nickname'), i.get('account_id'))
    return str1
AS3:

//to do

CSS надо подключать как отдельный файл или его там же использовать? 

 

p.s Щя попробую. 

Edited by Mr.Deno

Share this post


Link to post

Short link
Share on other sites

Есть ли разница куда вставлять?

var css:String;
  css += "ul { list-style: none; }";
  css += "li { display: inline-block; width: 49%; vertical-align: top; }";
  textFieldTest.styleSheet = WGUtils.createStyleSheet(css);

Если не имеет значения куда вставлять тогда у меня выдает ошибку

Error: Access of undefined property css.
Edited by Mr.Deno

Share this post


Link to post

Short link
Share on other sites

configUI до this.testF();

Я так понял так если так то ошибка при компиляции осталось 

override protected function configUI() : void
  {
   super.configUI();
   this.textFieldTest = new TextField();
   this.textFieldTest.width = 500;
   this.textFieldTest.height = 550;
   this.textFieldTest.x = 5;
   this.textFieldTest.y = 0;
   this.textFieldTest.multiline = true;
   this.textFieldTest.selectable = false;
  
   var css:String;
   css += "ul { list-style: none; }";
   css += "li { display: inline-block; width: 49%; vertical-align: top; }";
   textFieldTest.styleSheet = WGUtils.createStyleSheet(css);
  
   this.startF();
   this.addChild(this.textFieldTest);
   this.textFieldTest.addEventListener(MouseEvent.CLICK, this.ontextFieldTest);
  }
Edited by Mr.Deno

Share this post


Link to post

Short link
Share on other sites
на онклик привязать дестрой

Не реагирует на такое.

Лог чист.

+ при билде компилятору не нравится, что функции destroyW не присвоен тип, и она не возвращает никаких значений.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites
private var css:String ="";
this.css += "ul { list-style: none; }";
this.css += "li { display: inline-block; width: 49%; vertical-align: top; }";
this.textFieldTest.styleSheet = WGUtils.createStyleSheet(this.css);
override protected function configUI() : void
  {
   super.configUI();
   this.textFieldTest = new TextField();
   this.textFieldTest.width = 500;
   this.textFieldTest.height = 550;
   this.textFieldTest.x = 5;
   this.textFieldTest.y = 0;
   this.textFieldTest.multiline = true;
   this.textFieldTest.selectable = false;
    
    
   private var css:String ="";
   this.css += "ul { list-style: none; }";
   this.css += "li { display: inline-block; width: 49%; vertical-align: top; }";
   this.textFieldTest.styleSheet = WGUtils.createStyleSheet(this.css);
  
   this.startF();
   this.addChild(this.textFieldTest);
   this.textFieldTest.addEventListener(MouseEvent.CLICK, this.ontextFieldTest);
  }

Все равно ошибка  Error: The private attribute may be used only on class property definitions.

Share this post


Link to post

Short link
Share on other sites

private var css:String; попробуй поместить выше. Вне функции.

private var css:String = "";
 
  override protected function configUI() : void
  {
   super.configUI();
   this.textFieldTest = new TextField();
   this.textFieldTest.width = 500;
   this.textFieldTest.height = 550;
   this.textFieldTest.x = 5;
   this.textFieldTest.y = 0;
   this.textFieldTest.multiline = true;
   this.textFieldTest.selectable = false;
    
  
   this.css += "ul { list-style: none; }";
   this.css += "li { display: inline-block; width: 49%; vertical-align: top; }";
   this.textFieldTest.styleSheet = WGUtils.createStyleSheet(this.css);
  
   this.startF();
   this.addChild(this.textFieldTest);
   this.textFieldTest.addEventListener(MouseEvent.CLICK, this.ontextFieldTest);
  }

Error: Access of undefined property WGUtils.

Edited by Mr.Deno

Share this post


Link to post

Short link
Share on other sites

Попробуй :void

 

Пропустил эту ошибку когда вынес private var css:String = ""; за функцию 

 

Error: Access of undefined property WGUtils.

 

ругается на эту строчку this.textFieldTest.styleSheet = WGUtils.createStyleSheet(this.css);

Edited by Mr.Deno

Share this post


Link to post

Short link
Share on other sites

, пробовал, предупреждения нет, но всё так же не работает.

Edited by Kotyarko_O

Share this post


Link to post

Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...