Visualworks add widget programmatically

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

Visualworks add widget programmatically

akevalion
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Visualworks add widget programmatically

Karsten Kusche
Hi Milton,

have a look at the Dialog class. Every class method that opens a dialog like #confirm: or #warn: adds the buttons programatically.

Kind Regards
Karsten



-- 
Karsten Kusche - Dipl. Inf. (FH) - [hidden email]
Georg Heeg eK - Köthen
Handelsregister: Amtsgericht Dortmund A 12812 

Am Donnerstag, 21. März 2013 um 19:26 schrieb akevalion:

Hi,

I want to create some buttons in Visualworks programmatically but I cannot
find a nice example, could someone give a good example

Greetings,
Milton Mamani



--
Sent from the VisualWorks mailing list archive at Nabble.com.
_______________________________________________
vwnc mailing list


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Visualworks add widget programmatically

akevalion
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Visualworks add widget programmatically

Gary Peterson-2

 |b removeBlock|
 b := UIBuilder new.
 removeBlock :=
  [:key|
  |composite|
  composite := b composite.
  (composite components detect: [:ea| ea spec model = key] ifNone: [nil])
   ifNotNil: [:aComponentToRemove| composite removeComponent:
aComponentToRemove]].
 b
  actionAt: #cButton1 put: [Transcript show: 'Button 1 was clicked'; cr];
  actionAt: #cRemoveButton1 put: [removeBlock value: #cButton1];
  actionAt: #cAddButton1 put: [b add: (ActionButtonSpec model: #cButton1
label: 'Button 1' layout: (10@50 extent: 100@30))];
  add: (WindowSpec label: (#WindowSays << #examples >> 'Window Says'));
  add: (LabelSpec label: 'Howdy' layout: 10@10);
  add: (ActionButtonSpec model: #cRemoveButton1 label: 'Remove Button 1'
layout: (10@100 extent: 100@30));
  add: (ActionButtonSpec model: #cAddButton1 label: 'Add Button 1' layout:
(10@150 extent: 100@30)).
 b openIn: ((400@400) extent: (200@200)).




----- Original Message -----
From: "akevalion" <[hidden email]>
To: <[hidden email]>
Sent: Friday, March 22, 2013 2:30 PM
Subject: Re: [vwnc] Visualworks add widget programmatically


> Thanks for your help
>
> I did this:
>
> button := ActionButtonSpec model: #showInfo label: '123' layout: (10@10
> extent: 50@50).
> button name: 'mybut'; helpText: '123'.
> self builder add: button.
>
> Now I can't find the way to remove that button.
>
>
>
> --
> View this message in context:
> http://forum.world.st/Visualworks-add-widget-programmatically-tp4677690p4677850.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc