mIRC Homepage
Posted By: RusselB hsbar problem - 29/03/06 06:29 AM
When I go to add text to the dialog ID using the code for the ID as shown below, the horizontal scroll bar disappears, and the text moves to the end of the display. This isn't a problem if the text fits in the display, however, if it doesn't, I don't have the horizontal scroll bar to use for scrolling.
Code:
   edit "", 1018, 380 3 440 40, tab 1000 read hsbar 
 
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 06:41 AM
did -z $dname 1018
Posted By: RusselB Re: hsbar problem - 29/03/06 06:48 AM
thanks for that, now a related problem, the scroll bar isn't scrolling..this is my first time working with the scroll bars, so I've got almost no idea as to what I should or should not be including for parameters.
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 06:51 AM
show me the whole code u r uusing
Posted By: RusselB Re: hsbar problem - 29/03/06 07:32 AM
The entire code isn't necessary, and it's currently nearly 5000 lines. However, the part of the code that places the information into the edit box is
Code:
   did -zra $dname 1018 $strip($chan(%chan).topic)
 
Where %chan is the channel as selected in another section of the dialog.
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 08:00 AM
did -z $dname 1018 needs to be after the code u combined it with
Posted By: RusselB Re: hsbar problem - 29/03/06 08:17 AM
frown Not working. In case I've done something wrong, here's the on dialog event for that part as I currently have it.
Code:
 on *:dialog:Channel_Control:sclick:1004,2004,304:{
  did -r $dname 1006,2006,306
  did -c $dname 1004,2004,304 $did($did).sel
  .scon %cid
  set %chan $did($did).seltext
  did -ra $dname 1018 $strip($chan(%chan).topic)
  did -z $dname 1018
  var %a = 1, %b = $nick(%chan,0)
  while %a <= %b {
    did -a $dname 1006,2006,306 $nick(%chan,%a)
    inc %a
  }
}
 
This works fine with the exception of the dialog scroll bar for ID 1018
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 08:29 AM
try: did -z channel_control 1018
Posted By: RusselB Re: hsbar problem - 29/03/06 08:40 AM
Scroll bar still doesn't work, and it disappears if the text is longer than the length of the edit box, also, it doesn't come back until the dialog is closed and then reopened.

Added the -z switch to the /did -ra line so that the scroll bar at least shows when the length of the entry doesn't exceed the length of the box.
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 08:53 AM
instead of:
edit "", 1018, 380 3 440 40, tab 1000 read hsbar

ttry:
edit "", 1018, 380 3 440 40, tab 1000 read autohs autovs return
Posted By: RusselB Re: hsbar problem - 29/03/06 09:06 AM
That makes the text only show the last part of the topic (unless the entire topic fits). I had the same results on my own initial attempt using just autohs.
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 09:10 AM
edit wut i just said then use diid -z channel_control 1018
Posted By: RusselB Re: hsbar problem - 29/03/06 09:17 AM
I did before I posted.
Posted By: k1ll3rz Re: hsbar problem - 29/03/06 09:28 AM
not sure without seeing the whole script then...............
Posted By: RusselB Re: hsbar problem - 29/03/06 09:48 AM
Thanks for trying anyways. I for one don't feel like copy & pasting roughly 5000 lines of code, especially when most of it has no relevance to this problem (ie: doesn't even use that dialog ID)
Posted By: genius_at_work Re: hsbar problem - 29/03/06 03:19 PM
You need to specify the "multi" option on the edit box for hsbar to work (apparently). I used this code to test:

Code:
alias testd { dialog -m test test }
dialog test {
  size -1 -1 600 100 
  option dbu
  edit "", 1018, 10 3 440 40, tab 1000 read multi hsbar
}
on *:dialog:test:init:0:{ did -ra $dname 1018 $str(abcde $+ $chr(32),150) }



-genius_at_work
Posted By: RusselB Re: hsbar problem - 29/03/06 04:12 PM
Thanks Genius...once again you've resolved a problem I was having. I don't know if this next item, which is related, is a fluke or a bug (personally I don't think it should be this way), but I've noticed that sometimes the scroll bar shows and sometimes it doesn't, even though testing the scroll bar (even when it doesn't show) still works (the scroll bar shows up with the exception of the left & right scroll arrow keys (for lack of a better term). I've been unable to figure out a specific relation between the topic length and when the scroll bar does/does not display.
Posted By: MikeChat Re: hsbar problem - 29/03/06 07:38 PM
Genius, wouldnt putting the -z on a second line have done it too?

did -ra $dname 1018 $strip($chan(%chan).topic)
did -z $dname 1018
Posted By: RusselB Re: hsbar problem - 29/03/06 07:43 PM
Obviously not, since that was suggested and tried earlier.
Posted By: xDaeMoN Re: hsbar problem - 29/03/06 11:19 PM
AFAIK, The scroll bar only shows if the length of the text is more than the length of the edit box.
Posted By: MikeChat Re: hsbar problem - 29/03/06 11:23 PM
I had your post doing it like this
did -zra $dname 1018 $strip($chan(%chan).topic)

i didnt catch in a later post that you had done it.

I am curious why it didnt do it as it has worked lbefore I believe without the multi switch
Posted By: RusselB Re: hsbar problem - 29/03/06 11:44 PM
I realize that, but at times (and as I said I haven't been able to find a relationship), it's almost as if the scroll bar is there, but hidden.
Posted By: RusselB Re: hsbar problem - 29/03/06 11:56 PM
No idea Mike, as this is my first time working with the scrollbars in my own dialogs...maybe something to do with 6.17 versus 6.16 (or earlier)?
© mIRC Discussion Forums