Author Topic: Show Palette in specific size on start up  (Read 8054 times)

0 Members and 1 Guest are viewing this topic.

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Show Palette in specific size on start up
« on: December 10, 2015, 03:10:34 AM »
Hi,

I created a simple palette and added the codes to resize the palette at start up and it works in my laptop at home nicely but it doesn't work in my computer at the office.

Is there any System variable or so that controls the palette's size or re-sizing from machine to another ?

Thank you.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Show Palette in specific size on start up
« Reply #1 on: December 10, 2015, 03:57:52 AM »
I haven't played for a while, BUT,
you know what I'm going to ask.

Can you post a .ODCL and a .LSP with the minimum content to show the issue.
  added: If Owen needs to debug this it will save you time later.

A snapshot of the result in each case may help.

Is this for AutoCAD or BricsCAD

//------------

I have a recollection that the last used size may be saved in the registry ... but that may be a scrambled recollection.

Resizing is another issue. Is the palette docked? ... That was an issue at one stage ( again, old and possibly scrambled recollection )


Added:
Have you considered posting at the OpenDCL forum ?  You may be able to attract a broader base of regular users.
« Last Edit: December 10, 2015, 09:45:07 AM by Kerry »
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: Show Palette in specific size on start up
« Reply #2 on: December 10, 2015, 05:10:26 AM »
I haven't played for a while, BUT,
you know what I'm going to ask.

I knew that you'd do and that's why I said it is simple palette.  :wink:

added: It Owen needs to debug this it will save you time later.

Sorry , that is not clear enough to me.


added:
Have you considered posting at the OpenDCL forum ?  You may be able to attract a broader base of regular users.

Yes I have , but I am a frequent user to theSwamp and wanted to check it out here first.

I am not using BricsCAD at all.

Code - Auto/Visual Lisp: [Select]
  1. (command "OPENDCL")
  2. (defun c:test (/)
  3.   (dcl-project-load "AutoSleeve")
  4.   (dcl-form-show autosleeve/form1)
  5.   (princ)
  6. )
  7. (defun c:autosleeve/form1#oninitialize (/)
  8.   (dcl-Control-SetAllowResizing AutoSleeve/Form1 t)
  9.   (dcl-Form-Resize AutoSleeve/Form1 260. 425.)
  10.   (princ)
  11. )
  12.  

Thank you.

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: Show Palette in specific size on start up
« Reply #3 on: December 10, 2015, 06:13:46 AM »
What a work around on this problem or it might be considered a solution .

Changing the color of the palette to any color would solve it.  :2funny:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Show Palette in specific size on start up
« Reply #4 on: December 10, 2015, 09:44:30 AM »

added: If Owen needs to debug this it will save you time later.

Sorry , that is not clear enough to me.



I meant that Owen Wengerd from OpenDCL would require a sample so he could look for problems.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Show Palette in specific size on start up
« Reply #5 on: December 10, 2015, 11:03:50 AM »

Can you be more explicit about
Quote
.... but it doesn't work in my computer at the office.

I note that you are re-sizing to the asDesigned values.
 
Your design works out of the box for me
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Tharwat

  • Swamp Rat
  • Posts: 707
  • Hypersensitive
Re: Show Palette in specific size on start up
« Reply #6 on: December 10, 2015, 11:19:09 AM »
Can you be more explicit about
Quote
.... but it doesn't work in my computer at the office.

I mean , when I use the above posted codes in my laptop at home it works but when I use it at the office it doesn't change the size of the palette and it is starting expanded as in your snapshot ( expanded from bottom to top ).

Now after changing the color of the palette , the settings of the palette is enough to set the palette as per the settings without the needs of the above posted codes to re-size the palette on the fly ( on invoking/opening ).

Try to change the palette's color to any one you like , then just use the codes to load and show the palette without the codes to re-sizing on initializing.

Like this:

Code - Auto/Visual Lisp: [Select]
  1. (defun c:test (/)
  2.   (dcl-project-load "AutoSleeve")
  3.   (dcl-form-show autosleeve/form1)
  4.   (princ)
  5. )